1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 |
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | import { MDCFoundation } from '@material/base/foundation';
|
24 | import { MDCChipTrailingActionNavigationEvent } from '../trailingaction/types';
|
25 | import { MDCChipAdapter } from './adapter';
|
26 | export declare class MDCChipFoundation extends MDCFoundation<MDCChipAdapter> {
|
27 | static get strings(): {
|
28 | ADDED_ANNOUNCEMENT_ATTRIBUTE: string;
|
29 | ARIA_CHECKED: string;
|
30 | ARROW_DOWN_KEY: string;
|
31 | ARROW_LEFT_KEY: string;
|
32 | ARROW_RIGHT_KEY: string;
|
33 | ARROW_UP_KEY: string;
|
34 | BACKSPACE_KEY: string;
|
35 | CHECKMARK_SELECTOR: string;
|
36 | DELETE_KEY: string;
|
37 | END_KEY: string;
|
38 | ENTER_KEY: string;
|
39 | ENTRY_ANIMATION_NAME: string;
|
40 | HOME_KEY: string;
|
41 | IE_ARROW_DOWN_KEY: string;
|
42 | IE_ARROW_LEFT_KEY: string;
|
43 | IE_ARROW_RIGHT_KEY: string;
|
44 | IE_ARROW_UP_KEY: string;
|
45 | IE_DELETE_KEY: string;
|
46 | INTERACTION_EVENT: string;
|
47 | LEADING_ICON_SELECTOR: string;
|
48 | NAVIGATION_EVENT: string;
|
49 | PRIMARY_ACTION_SELECTOR: string;
|
50 | REMOVED_ANNOUNCEMENT_ATTRIBUTE: string;
|
51 | REMOVAL_EVENT: string;
|
52 | SELECTION_EVENT: string;
|
53 | SPACEBAR_KEY: string;
|
54 | TAB_INDEX: string;
|
55 | TRAILING_ACTION_SELECTOR: string;
|
56 | TRAILING_ICON_INTERACTION_EVENT: string;
|
57 | TRAILING_ICON_SELECTOR: string;
|
58 | };
|
59 | static get cssClasses(): {
|
60 | CHECKMARK: string;
|
61 | CHIP_EXIT: string;
|
62 | DELETABLE: string;
|
63 | EDITABLE: string;
|
64 | EDITING: string;
|
65 | HIDDEN_LEADING_ICON: string;
|
66 | LEADING_ICON: string;
|
67 | PRIMARY_ACTION: string;
|
68 | PRIMARY_ACTION_FOCUSED: string;
|
69 | SELECTED: string;
|
70 | TEXT: string;
|
71 | TRAILING_ACTION: string;
|
72 | TRAILING_ICON: string;
|
73 | };
|
74 | static get defaultAdapter(): MDCChipAdapter;
|
75 |
|
76 | private shouldRemoveOnTrailingIconClick;
|
77 | |
78 |
|
79 |
|
80 |
|
81 |
|
82 | private shouldFocusPrimaryActionOnClick;
|
83 | constructor(adapter?: Partial<MDCChipAdapter>);
|
84 | isSelected(): boolean;
|
85 | isEditable(): boolean;
|
86 | isEditing(): boolean;
|
87 | setSelected(selected: boolean): void;
|
88 | setSelectedFromChipSet(selected: boolean, shouldNotifyClients: boolean): void;
|
89 | getShouldRemoveOnTrailingIconClick(): boolean;
|
90 | setShouldRemoveOnTrailingIconClick(shouldRemove: boolean): void;
|
91 | setShouldFocusPrimaryActionOnClick(shouldFocus: boolean): void;
|
92 | getDimensions(): DOMRect;
|
93 | /**
|
94 | * Begins the exit animation which leads to removal of the chip.
|
95 | */
|
96 | beginExit(): void;
|
97 | handleClick(): void;
|
98 | handleDoubleClick(): void;
|
99 | /**
|
100 | * Handles a transition end event on the root element.
|
101 | */
|
102 | handleTransitionEnd(evt: TransitionEvent): void;
|
103 | handleFocusIn(evt: FocusEvent): void;
|
104 | handleFocusOut(evt: FocusEvent): void;
|
105 | /**
|
106 | * Handles an interaction event on the trailing icon element. This is used to
|
107 | * prevent the ripple from activating on interaction with the trailing icon.
|
108 | */
|
109 | handleTrailingActionInteraction(): void;
|
110 | /**
|
111 | * Handles a keydown event from the root element.
|
112 | */
|
113 | handleKeydown(evt: KeyboardEvent): void;
|
114 | handleTrailingActionNavigation(evt: MDCChipTrailingActionNavigationEvent): void;
|
115 | /**
|
116 | * Called by the chip set to remove focus from the chip actions.
|
117 | */
|
118 | removeFocus(): void;
|
119 | /**
|
120 | * Called by the chip set to focus the primary action.
|
121 | *
|
122 | */
|
123 | focusPrimaryAction(): void;
|
124 | /**
|
125 | * Called by the chip set to focus the trailing action (if present), otherwise
|
126 | * gives focus to the trailing action.
|
127 | */
|
128 | focusTrailingAction(): void;
|
129 | private setPrimaryActionFocusable;
|
130 | private getFocusBehavior;
|
131 | private focusNextAction;
|
132 | private getDirection;
|
133 | private removeChip;
|
134 | private shouldStartEditing;
|
135 | private shouldFinishEditing;
|
136 | private shouldNotifyInteraction;
|
137 | private isDeleteAction;
|
138 | private setSelectedImpl;
|
139 | private notifySelection;
|
140 | private notifyIgnoredSelection;
|
141 | private eventFromPrimaryAction;
|
142 | private startEditing;
|
143 | private finishEditing;
|
144 | }
|
145 | export default MDCChipFoundation;
|