1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | export var Direction;
|
24 | (function (Direction) {
|
25 | Direction["LEFT"] = "left";
|
26 | Direction["RIGHT"] = "right";
|
27 | })(Direction || (Direction = {}));
|
28 | export var EventSource;
|
29 | (function (EventSource) {
|
30 | EventSource["PRIMARY"] = "primary";
|
31 | EventSource["TRAILING"] = "trailing";
|
32 | EventSource["NONE"] = "none";
|
33 | })(EventSource || (EventSource = {}));
|
34 | export var strings = {
|
35 | ADDED_ANNOUNCEMENT_ATTRIBUTE: 'data-mdc-chip-added-announcement',
|
36 | ARIA_CHECKED: 'aria-checked',
|
37 | ARROW_DOWN_KEY: 'ArrowDown',
|
38 | ARROW_LEFT_KEY: 'ArrowLeft',
|
39 | ARROW_RIGHT_KEY: 'ArrowRight',
|
40 | ARROW_UP_KEY: 'ArrowUp',
|
41 | BACKSPACE_KEY: 'Backspace',
|
42 | CHECKMARK_SELECTOR: '.mdc-chip__checkmark',
|
43 | DELETE_KEY: 'Delete',
|
44 | END_KEY: 'End',
|
45 | ENTER_KEY: 'Enter',
|
46 | ENTRY_ANIMATION_NAME: 'mdc-chip-entry',
|
47 | HOME_KEY: 'Home',
|
48 | IE_ARROW_DOWN_KEY: 'Down',
|
49 | IE_ARROW_LEFT_KEY: 'Left',
|
50 | IE_ARROW_RIGHT_KEY: 'Right',
|
51 | IE_ARROW_UP_KEY: 'Up',
|
52 | IE_DELETE_KEY: 'Del',
|
53 | INTERACTION_EVENT: 'MDCChip:interaction',
|
54 | LEADING_ICON_SELECTOR: '.mdc-chip__icon--leading',
|
55 | NAVIGATION_EVENT: 'MDCChip:navigation',
|
56 | PRIMARY_ACTION_SELECTOR: '.mdc-chip__primary-action',
|
57 | REMOVED_ANNOUNCEMENT_ATTRIBUTE: 'data-mdc-chip-removed-announcement',
|
58 | REMOVAL_EVENT: 'MDCChip:removal',
|
59 | SELECTION_EVENT: 'MDCChip:selection',
|
60 | SPACEBAR_KEY: ' ',
|
61 | TAB_INDEX: 'tabindex',
|
62 | TRAILING_ACTION_SELECTOR: '.mdc-chip-trailing-action',
|
63 | TRAILING_ICON_INTERACTION_EVENT: 'MDCChip:trailingIconInteraction',
|
64 | TRAILING_ICON_SELECTOR: '.mdc-chip__icon--trailing',
|
65 | };
|
66 | export var cssClasses = {
|
67 | CHECKMARK: 'mdc-chip__checkmark',
|
68 | CHIP_EXIT: 'mdc-chip--exit',
|
69 | DELETABLE: 'mdc-chip--deletable',
|
70 | EDITABLE: 'mdc-chip--editable',
|
71 | EDITING: 'mdc-chip--editing',
|
72 | HIDDEN_LEADING_ICON: 'mdc-chip__icon--leading-hidden',
|
73 | LEADING_ICON: 'mdc-chip__icon--leading',
|
74 | PRIMARY_ACTION: 'mdc-chip__primary-action',
|
75 | PRIMARY_ACTION_FOCUSED: 'mdc-chip--primary-action-focused',
|
76 | SELECTED: 'mdc-chip--selected',
|
77 | TEXT: 'mdc-chip__text',
|
78 | TRAILING_ACTION: 'mdc-chip__trailing-action',
|
79 | TRAILING_ICON: 'mdc-chip__icon--trailing',
|
80 | };
|
81 | export var navigationKeys = new Set();
|
82 |
|
83 | navigationKeys.add(strings.ARROW_LEFT_KEY);
|
84 | navigationKeys.add(strings.ARROW_RIGHT_KEY);
|
85 | navigationKeys.add(strings.ARROW_DOWN_KEY);
|
86 | navigationKeys.add(strings.ARROW_UP_KEY);
|
87 | navigationKeys.add(strings.END_KEY);
|
88 | navigationKeys.add(strings.HOME_KEY);
|
89 | navigationKeys.add(strings.IE_ARROW_LEFT_KEY);
|
90 | navigationKeys.add(strings.IE_ARROW_RIGHT_KEY);
|
91 | navigationKeys.add(strings.IE_ARROW_DOWN_KEY);
|
92 | navigationKeys.add(strings.IE_ARROW_UP_KEY);
|
93 | export var jumpChipKeys = new Set();
|
94 |
|
95 | jumpChipKeys.add(strings.ARROW_UP_KEY);
|
96 | jumpChipKeys.add(strings.ARROW_DOWN_KEY);
|
97 | jumpChipKeys.add(strings.HOME_KEY);
|
98 | jumpChipKeys.add(strings.END_KEY);
|
99 | jumpChipKeys.add(strings.IE_ARROW_UP_KEY);
|
100 | jumpChipKeys.add(strings.IE_ARROW_DOWN_KEY);
|
101 |
|
\ | No newline at end of file |