@fibrae/semi-foundation 0.1.1 → 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/dist/anchor/foundation.d.ts +1 -1
- package/dist/anchor/foundation.js +21 -21
- package/dist/audio-player/foundation.d.ts +10 -10
- package/dist/audio-player/foundation.js +19 -19
- package/dist/auto-complete/foundation.d.ts +12 -12
- package/dist/auto-complete/foundation.js +51 -51
- package/dist/avatar/foundation.d.ts +5 -5
- package/dist/avatar/foundation.js +16 -16
- package/dist/backtop/foundation.d.ts +2 -2
- package/dist/backtop/foundation.js +7 -7
- package/dist/banner/foundation.d.ts +1 -1
- package/dist/banner/foundation.js +4 -4
- package/dist/base/auto-close-foundation.d.ts +8 -8
- package/dist/base/auto-close-foundation.js +15 -15
- package/dist/base/foundation.d.ts +4 -3
- package/dist/base/foundation.js +12 -11
- package/dist/breadcrumb/foundation.d.ts +5 -5
- package/dist/breadcrumb/foundation.js +9 -10
- package/dist/breadcrumb/item-foundation.d.ts +3 -3
- package/dist/breadcrumb/item-foundation.js +6 -6
- package/dist/calendar/event-util.js +1 -1
- package/dist/calendar/foundation.js +4 -4
- package/dist/calendar/month-foundation.d.ts +2 -2
- package/dist/calendar/month-foundation.js +6 -6
- package/dist/carousel/foundation.d.ts +17 -17
- package/dist/carousel/foundation.js +51 -51
- package/dist/cascader/foundation.d.ts +34 -26
- package/dist/cascader/foundation.js +143 -121
- package/dist/checkbox/checkbox-foundation.d.ts +2 -2
- package/dist/checkbox/checkbox-foundation.js +15 -15
- package/dist/checkbox/checkbox-group-foundation.d.ts +2 -2
- package/dist/checkbox/checkbox-group-foundation.js +8 -8
- package/dist/code-highlight/index.d.ts +1 -1
- package/dist/code-highlight/index.js +3 -3
- package/dist/collapse/foundation.d.ts +2 -2
- package/dist/collapse/foundation.js +7 -7
- package/dist/collapsible/foundation.d.ts +3 -3
- package/dist/collapsible/foundation.js +8 -8
- package/dist/color-picker/alpha-slider-foundation.d.ts +2 -4
- package/dist/color-picker/alpha-slider-foundation.js +10 -10
- package/dist/color-picker/color-choose-area-foundation.d.ts +2 -5
- package/dist/color-picker/color-choose-area-foundation.js +14 -14
- package/dist/color-picker/color-slider-foundation.d.ts +2 -4
- package/dist/color-picker/color-slider-foundation.js +10 -10
- package/dist/color-picker/data-part-foundation.d.ts +5 -5
- package/dist/color-picker/data-part-foundation.js +11 -11
- package/dist/color-picker/foundation.d.ts +4 -4
- package/dist/color-picker/foundation.js +10 -10
- package/dist/config-provider/breakpoint-observer.d.ts +3 -3
- package/dist/config-provider/breakpoint-observer.js +6 -6
- package/dist/cropper/foundation.d.ts +15 -15
- package/dist/cropper/foundation.js +26 -23
- package/dist/date-picker/_utils/picker-type.d.ts +1 -1
- package/dist/date-picker/foundation.d.ts +36 -36
- package/dist/date-picker/foundation.js +125 -129
- package/dist/date-picker/input-foundation.d.ts +9 -9
- package/dist/date-picker/input-foundation.js +28 -28
- package/dist/date-picker/months-grid-foundation.d.ts +16 -16
- package/dist/date-picker/months-grid-foundation.js +64 -65
- package/dist/date-picker/year-and-month-foundation.d.ts +3 -3
- package/dist/date-picker/year-and-month-foundation.js +11 -11
- package/dist/drag-move/foundation.d.ts +2 -2
- package/dist/drag-move/foundation.js +15 -13
- package/dist/dropdown/foundation.d.ts +8 -5
- package/dist/dropdown/foundation.js +32 -28
- package/dist/dropdown/menu-foundation.d.ts +1 -1
- package/dist/dropdown/menu-foundation.js +11 -11
- package/dist/feedback/foundation.d.ts +9 -9
- package/dist/feedback/foundation.js +33 -33
- package/dist/form/form-api-proxy.d.ts +8 -7
- package/dist/form/form-api-proxy.js +25 -25
- package/dist/form/foundation.d.ts +5 -5
- package/dist/form/foundation.js +60 -61
- package/dist/highlight/foundation.js +1 -1
- package/dist/hot-keys/foundation.d.ts +2 -2
- package/dist/hot-keys/foundation.js +5 -5
- package/dist/image/image-foundation.d.ts +4 -4
- package/dist/image/image-foundation.js +10 -10
- package/dist/image/preview-footer-foundation.d.ts +3 -3
- package/dist/image/preview-footer-foundation.js +10 -10
- package/dist/image/preview-foundation.js +7 -6
- package/dist/image/preview-image-foundation.d.ts +6 -8
- package/dist/image/preview-image-foundation.js +14 -14
- package/dist/image/preview-inner-foundation.d.ts +9 -9
- package/dist/image/preview-inner-foundation.js +38 -38
- package/dist/input/foundation.d.ts +10 -10
- package/dist/input/foundation.js +47 -49
- package/dist/input/text-entry-foundation.d.ts +3 -3
- package/dist/input/text-entry-foundation.js +14 -14
- package/dist/input/textarea-foundation.d.ts +7 -7
- package/dist/input/textarea-foundation.js +36 -36
- package/dist/input-number/foundation.d.ts +16 -14
- package/dist/input-number/foundation.js +54 -53
- package/dist/json-viewer/foundation.d.ts +8 -8
- package/dist/json-viewer/foundation.js +23 -23
- package/dist/lottie/foundation.d.ts +1 -1
- package/dist/lottie/foundation.js +4 -4
- package/dist/markdown-render/foundation.d.ts +1 -1
- package/dist/markdown-render/foundation.js +4 -4
- package/dist/modal/modal-content-foundation.d.ts +7 -7
- package/dist/modal/modal-content-foundation.js +20 -20
- package/dist/modal/modal-foundation.d.ts +6 -6
- package/dist/modal/modal-foundation.js +24 -24
- package/dist/navigation/foundation.d.ts +1 -1
- package/dist/navigation/foundation.js +14 -14
- package/dist/navigation/item-foundation.d.ts +1 -1
- package/dist/navigation/item-foundation.js +8 -8
- package/dist/navigation/sub-nav-foundation.d.ts +3 -3
- package/dist/navigation/sub-nav-foundation.js +17 -17
- package/dist/notification/notification-list-foundation.d.ts +7 -7
- package/dist/notification/notification-list-foundation.js +12 -12
- package/dist/overflow-list/foundation.d.ts +4 -4
- package/dist/overflow-list/foundation.js +18 -18
- package/dist/pagination/foundation.d.ts +8 -8
- package/dist/pagination/foundation.js +28 -28
- package/dist/pincode/foundation.d.ts +5 -5
- package/dist/pincode/foundation.js +22 -22
- package/dist/popconfirm/popconfirm-foundation.d.ts +7 -7
- package/dist/popconfirm/popconfirm-foundation.js +26 -26
- package/dist/radio/radio-foundation.d.ts +5 -5
- package/dist/radio/radio-foundation.js +15 -15
- package/dist/radio/radio-group-foundation.d.ts +2 -2
- package/dist/radio/radio-group-foundation.js +9 -9
- package/dist/rating/foundation.d.ts +10 -10
- package/dist/rating/foundation.js +35 -35
- package/dist/resizable/group/index.d.ts +6 -6
- package/dist/resizable/group/index.js +40 -40
- package/dist/resizable/single/index.d.ts +2 -2
- package/dist/resizable/single/index.js +9 -9
- package/dist/scroll-list/item-foundation.d.ts +7 -7
- package/dist/scroll-list/item-foundation.js +35 -35
- package/dist/select/foundation.d.ts +42 -56
- package/dist/select/foundation.js +214 -279
- package/dist/select/option-foundation.d.ts +23 -27
- package/dist/select/option-foundation.js +10 -18
- package/dist/side-sheet/side-sheet-foundation.d.ts +6 -6
- package/dist/side-sheet/side-sheet-foundation.js +22 -22
- package/dist/slider/foundation.d.ts +16 -16
- package/dist/slider/foundation.js +46 -46
- package/dist/sortable/accessibility.d.ts +1 -1
- package/dist/sortable/accessibility.js +2 -2
- package/dist/spin/foundation.d.ts +2 -2
- package/dist/spin/foundation.js +6 -6
- package/dist/steps/utils.d.ts +1 -1
- package/dist/switch/foundation.d.ts +2 -2
- package/dist/switch/foundation.js +7 -7
- package/dist/table/foundation.d.ts +14 -14
- package/dist/table/foundation.js +93 -93
- package/dist/table/utils.d.ts +2 -2
- package/dist/tabs/foundation.d.ts +5 -5
- package/dist/tabs/foundation.js +17 -17
- package/dist/tag-input/foundation.d.ts +11 -11
- package/dist/tag-input/foundation.js +52 -52
- package/dist/time-picker/foundation.d.ts +13 -13
- package/dist/time-picker/foundation.js +39 -39
- package/dist/time-picker/input-foundation.d.ts +4 -4
- package/dist/time-picker/input-foundation.js +13 -13
- package/dist/toast/toast-list-foundation.d.ts +7 -7
- package/dist/toast/toast-list-foundation.js +14 -14
- package/dist/tooltip/foundation.d.ts +9 -9
- package/dist/tooltip/foundation.js +67 -61
- package/dist/transfer/foundation.d.ts +22 -9
- package/dist/transfer/foundation.js +38 -23
- package/dist/tree/foundation.d.ts +14 -14
- package/dist/tree/foundation.js +61 -61
- package/dist/tree/shared.d.ts +1 -1
- package/dist/tree-select/foundation.d.ts +26 -20
- package/dist/tree-select/foundation.js +91 -83
- package/dist/typography/ellipsis.d.ts +4 -4
- package/dist/typography/ellipsis.js +8 -8
- package/dist/typography/format-numeral.d.ts +1 -1
- package/dist/typography/format-numeral.js +2 -2
- package/dist/upload/constants.d.ts +1 -1
- package/dist/upload/foundation.d.ts +17 -17
- package/dist/upload/foundation.js +92 -92
- package/dist/upload/utils.d.ts +3 -3
- package/dist/upload/utils.js +6 -6
- package/dist/user-guide/foundation.d.ts +3 -3
- package/dist/user-guide/foundation.js +19 -19
- package/dist/utils/a11y.d.ts +1 -1
- package/dist/utils/announcer.d.ts +2 -2
- package/dist/utils/announcer.js +4 -4
- package/dist/utils/focus-handle.d.ts +1 -1
- package/dist/utils/focus-handle.js +1 -2
- package/dist/utils/focus-scope.d.ts +5 -5
- package/dist/utils/focus-scope.js +10 -10
- package/dist/utils/is-promise.d.ts +1 -1
- package/dist/utils/release-holder.d.ts +2 -2
- package/dist/utils/release-holder.js +4 -4
- package/dist/video-player/foundation.d.ts +15 -15
- package/dist/video-player/foundation.js +89 -89
- package/dist/video-player/progress-foundation.d.ts +2 -2
- package/dist/video-player/progress-foundation.js +12 -12
- package/package.json +2 -2
|
@@ -10,7 +10,7 @@ var PaginationFoundation = class PaginationFoundation extends BaseFoundation {
|
|
|
10
10
|
page = Math.trunc(page);
|
|
11
11
|
if (page > totalPageNum) page = totalPageNum;
|
|
12
12
|
if (page <= 0) page = 1;
|
|
13
|
-
this.
|
|
13
|
+
this.adapter.updateQuickJumpPage("");
|
|
14
14
|
this.goPage(page);
|
|
15
15
|
}
|
|
16
16
|
static getInitialState(props) {
|
|
@@ -126,50 +126,50 @@ var PaginationFoundation = class PaginationFoundation extends BaseFoundation {
|
|
|
126
126
|
const firstLargerIndex = pageSizeOpts.findIndex((el) => el > pageSize);
|
|
127
127
|
return firstLargerIndex === -1 ? [...pageSizeOpts, pageSize] : pageSizeOpts.toSpliced(firstLargerIndex, 0, pageSize);
|
|
128
128
|
}
|
|
129
|
-
goPage(targetPageIndex) {
|
|
129
|
+
goPage = (targetPageIndex) => {
|
|
130
130
|
if (targetPageIndex === "...") return;
|
|
131
131
|
const { pageSize, currentPage } = this.getStates();
|
|
132
132
|
if (targetPageIndex === currentPage) return;
|
|
133
|
-
if (!this.
|
|
134
|
-
this.
|
|
135
|
-
this.
|
|
136
|
-
}
|
|
137
|
-
updatePage(targetPageIndex = 1, pageSize) {
|
|
133
|
+
if (!this.isControlledComponent("currentPage")) this.updatePage(targetPageIndex);
|
|
134
|
+
this.adapter.notifyPageChange(targetPageIndex);
|
|
135
|
+
this.adapter.notifyChange(targetPageIndex, pageSize);
|
|
136
|
+
};
|
|
137
|
+
updatePage = (targetPageIndex = 1, pageSize) => {
|
|
138
138
|
const { currentPage, pageSize: currentPageSize } = this.getStates();
|
|
139
139
|
const newPageSize = pageSize ?? currentPageSize;
|
|
140
|
-
if (targetPageIndex !== currentPage) this.
|
|
141
|
-
if (newPageSize !== currentPageSize) this.
|
|
142
|
-
}
|
|
143
|
-
goPrev() {
|
|
140
|
+
if (targetPageIndex !== currentPage) this.adapter.setCurrentPage(targetPageIndex);
|
|
141
|
+
if (newPageSize !== currentPageSize) this.adapter.updatePageSize(newPageSize);
|
|
142
|
+
};
|
|
143
|
+
goPrev = () => {
|
|
144
144
|
const { currentPage } = this.getStates();
|
|
145
145
|
if (currentPage > 1) this.goPage(currentPage - 1);
|
|
146
|
-
}
|
|
147
|
-
goNext() {
|
|
146
|
+
};
|
|
147
|
+
goNext = () => {
|
|
148
148
|
const { currentPage, pageSize } = this.getStates();
|
|
149
149
|
if (currentPage <= PaginationFoundation.getTotalPageNumber(this.getProp("total"), pageSize) - 1) this.goPage(currentPage + 1);
|
|
150
|
-
}
|
|
151
|
-
changePageSize(newPageSize) {
|
|
150
|
+
};
|
|
151
|
+
changePageSize = (newPageSize) => {
|
|
152
152
|
const { pageSize, currentPage } = this.getStates();
|
|
153
|
-
this.
|
|
154
|
-
this.
|
|
153
|
+
this.adapter.updatePageSize(newPageSize);
|
|
154
|
+
this.adapter.notifyPageSizeChange(newPageSize);
|
|
155
155
|
let newCurrentPage = currentPage;
|
|
156
156
|
if (!this.getProp("preventPageChangeOnPageSizeChange")) {
|
|
157
157
|
const currentPageFirstItemIndex = (currentPage - 1) * pageSize + 1;
|
|
158
158
|
newCurrentPage = Math.ceil(currentPageFirstItemIndex / newPageSize);
|
|
159
159
|
}
|
|
160
|
-
if (!this.
|
|
161
|
-
if (currentPage !== newCurrentPage) this.
|
|
162
|
-
this.
|
|
163
|
-
}
|
|
164
|
-
handleQuickJumpNumberChange(targetPage) {
|
|
165
|
-
this.
|
|
166
|
-
}
|
|
167
|
-
handleQuickJumpBlur() {
|
|
160
|
+
if (!this.isControlledComponent("currentPage")) this.updatePage(newCurrentPage, newPageSize);
|
|
161
|
+
if (currentPage !== newCurrentPage) this.adapter.notifyPageChange(newCurrentPage);
|
|
162
|
+
this.adapter.notifyChange(newCurrentPage, newPageSize);
|
|
163
|
+
};
|
|
164
|
+
handleQuickJumpNumberChange = (targetPage) => {
|
|
165
|
+
this.adapter.updateQuickJumpPage(targetPage);
|
|
166
|
+
};
|
|
167
|
+
handleQuickJumpBlur = () => {
|
|
168
168
|
const { quickJumpPage } = this.getStates();
|
|
169
169
|
if (typeof quickJumpPage === "string" && quickJumpPage || typeof quickJumpPage === "number") this.#handleQuickJump(quickJumpPage);
|
|
170
|
-
}
|
|
171
|
-
handleQuickJumpEnterPress(targetPage) {
|
|
170
|
+
};
|
|
171
|
+
handleQuickJumpEnterPress = (targetPage) => {
|
|
172
172
|
this.#handleQuickJump(targetPage);
|
|
173
|
-
}
|
|
173
|
+
};
|
|
174
174
|
};
|
|
175
175
|
export { PaginationFoundation as default };
|
|
@@ -23,17 +23,17 @@ export interface PinCodeAdapter<P extends PinCodeBaseProps = PinCodeBaseProps, S
|
|
|
23
23
|
export default class PinCodeFoundation<P extends PinCodeBaseProps = PinCodeBaseProps, S extends PinCodeBaseState = PinCodeBaseState> extends BaseFoundation<PinCodeAdapter<P, S>, P, S> {
|
|
24
24
|
static numberReg: RegExp;
|
|
25
25
|
static mixedReg: RegExp;
|
|
26
|
-
handleCurrentActiveIndexChange(index: number, state:
|
|
26
|
+
handleCurrentActiveIndexChange: (index: number, state: "focus" | "blur") => void;
|
|
27
27
|
completeSingleInput(i: number, singleInputValue: string): Promise<void>;
|
|
28
28
|
/** `data` is the InputEvent or CompositionEvent data of the change, if any */
|
|
29
|
-
handleCellChange(index: number, value: string, data?: string | null)
|
|
29
|
+
handleCellChange: (index: number, value: string, data?: string | null) => void;
|
|
30
30
|
validateValue(value?: string): boolean;
|
|
31
|
-
updateValueList(newValueList: PinCodeBaseState[
|
|
32
|
-
handlePaste(e: ClipboardEvent, startInputIndex: number)
|
|
31
|
+
updateValueList: (newValueList: PinCodeBaseState["valueList"]) => Promise<void>;
|
|
32
|
+
handlePaste: (e: ClipboardEvent, startInputIndex: number) => Promise<void>;
|
|
33
33
|
/**
|
|
34
34
|
* Removes the character and closes the gap. Also covers a cell emptied without Backspace or Delete (cut, a
|
|
35
35
|
* virtual keyboard's delete).
|
|
36
36
|
*/
|
|
37
37
|
removeCell(index: number): void;
|
|
38
|
-
handleKeyDownOnSingleInput(e: KeyboardEvent, index: number)
|
|
38
|
+
handleKeyDownOnSingleInput: (e: KeyboardEvent, index: number) => void;
|
|
39
39
|
}
|
|
@@ -3,31 +3,31 @@ import BaseFoundation from "../base/foundation.js";
|
|
|
3
3
|
var PinCodeFoundation = class PinCodeFoundation extends BaseFoundation {
|
|
4
4
|
static numberReg = /^\d*$/;
|
|
5
5
|
static mixedReg = /^[0-9a-zA-Z]$/;
|
|
6
|
-
handleCurrentActiveIndexChange(index, state) {
|
|
7
|
-
if (state === "focus") this.
|
|
8
|
-
}
|
|
6
|
+
handleCurrentActiveIndexChange = (index, state) => {
|
|
7
|
+
if (state === "focus") this.adapter.onCurrentActiveIndexChange(index);
|
|
8
|
+
};
|
|
9
9
|
async completeSingleInput(i, singleInputValue) {
|
|
10
|
-
const isControlledComponent = this.
|
|
10
|
+
const isControlledComponent = this.isControlledComponent("value");
|
|
11
11
|
const index = Math.min(i, this.getState("valueList").length);
|
|
12
|
-
await this.
|
|
12
|
+
await this.adapter.onCurrentActiveIndexChange(index + 1);
|
|
13
13
|
const valueList = [...this.getState("valueList")];
|
|
14
14
|
valueList[index] = singleInputValue;
|
|
15
|
-
this.
|
|
15
|
+
this.adapter.notifyValueChange(valueList);
|
|
16
16
|
if (!isControlledComponent) await this.updateValueList(valueList);
|
|
17
17
|
const count = this.getProp("count");
|
|
18
|
-
if (index + 1 > count - 1) this.
|
|
19
|
-
else this.
|
|
20
|
-
if (valueList.length === count) this.
|
|
18
|
+
if (index + 1 > count - 1) this.adapter.changeSpecificInputFocusState(index, "blur");
|
|
19
|
+
else this.adapter.changeSpecificInputFocusState(index + 1, "focus");
|
|
20
|
+
if (valueList.length === count) this.adapter.notifyComplete(valueList.join(""));
|
|
21
21
|
}
|
|
22
22
|
/** `data` is the InputEvent or CompositionEvent data of the change, if any */
|
|
23
|
-
handleCellChange(index, value, data) {
|
|
23
|
+
handleCellChange = (index, value, data) => {
|
|
24
24
|
if (value === "") {
|
|
25
25
|
this.removeCell(index);
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
const char = data && Array.from(data).length === 1 ? data : Array.from(value).at(-1);
|
|
29
29
|
if (this.validateValue(char)) this.completeSingleInput(index, char);
|
|
30
|
-
}
|
|
30
|
+
};
|
|
31
31
|
validateValue(value = "") {
|
|
32
32
|
const format = this.getProp("format");
|
|
33
33
|
let validateFunction = (_value) => true;
|
|
@@ -41,10 +41,10 @@ var PinCodeFoundation = class PinCodeFoundation extends BaseFoundation {
|
|
|
41
41
|
else if (typeof format === "function") validateFunction = format;
|
|
42
42
|
return validateFunction(value);
|
|
43
43
|
}
|
|
44
|
-
async
|
|
45
|
-
await this.
|
|
46
|
-
}
|
|
47
|
-
async
|
|
44
|
+
updateValueList = async (newValueList) => {
|
|
45
|
+
await this.adapter.updateValueList(newValueList);
|
|
46
|
+
};
|
|
47
|
+
handlePaste = async (e, startInputIndex) => {
|
|
48
48
|
e.preventDefault();
|
|
49
49
|
const textWillPaste = Array.from(e.clipboardData.getData("text"));
|
|
50
50
|
const count = this.getProp("count");
|
|
@@ -54,7 +54,7 @@ var PinCodeFoundation = class PinCodeFoundation extends BaseFoundation {
|
|
|
54
54
|
if (this.validateValue(currentChar)) await this.completeSingleInput(i, currentChar);
|
|
55
55
|
else break;
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
};
|
|
58
58
|
/**
|
|
59
59
|
* Removes the character and closes the gap. Also covers a cell emptied without Backspace or Delete (cut, a
|
|
60
60
|
* virtual keyboard's delete).
|
|
@@ -62,25 +62,25 @@ var PinCodeFoundation = class PinCodeFoundation extends BaseFoundation {
|
|
|
62
62
|
removeCell(index) {
|
|
63
63
|
const valueList = this.getState("valueList").toSpliced(index, 1);
|
|
64
64
|
this.updateValueList(valueList);
|
|
65
|
-
this.
|
|
65
|
+
this.adapter.notifyValueChange(valueList);
|
|
66
66
|
}
|
|
67
|
-
handleKeyDownOnSingleInput(e, index) {
|
|
67
|
+
handleKeyDownOnSingleInput = (e, index) => {
|
|
68
68
|
const lastIndex = this.getProp("count") - 1;
|
|
69
69
|
if (e.key === "Backspace") {
|
|
70
70
|
this.removeCell(index);
|
|
71
|
-
this.
|
|
71
|
+
this.adapter.changeSpecificInputFocusState(Math.max(0, index - 1), "focus");
|
|
72
72
|
e.preventDefault();
|
|
73
73
|
} else if (e.key === "Delete") {
|
|
74
74
|
this.removeCell(index);
|
|
75
75
|
e.preventDefault();
|
|
76
76
|
} else if (e.altKey || e.ctrlKey || e.metaKey) return;
|
|
77
77
|
else if (e.key === "ArrowLeft") {
|
|
78
|
-
this.
|
|
78
|
+
this.adapter.changeSpecificInputFocusState(Math.max(0, index - 1), "focus");
|
|
79
79
|
e.preventDefault();
|
|
80
80
|
} else if (e.key === "ArrowRight") {
|
|
81
|
-
this.
|
|
81
|
+
this.adapter.changeSpecificInputFocusState(Math.min(lastIndex, index + 1), "focus");
|
|
82
82
|
e.preventDefault();
|
|
83
83
|
}
|
|
84
|
-
}
|
|
84
|
+
};
|
|
85
85
|
};
|
|
86
86
|
export { PinCodeFoundation as default };
|
|
@@ -3,8 +3,8 @@ export interface PopconfirmAdapter<P extends PopconfirmBaseProps = PopconfirmBas
|
|
|
3
3
|
setVisible: (visible: boolean) => void;
|
|
4
4
|
updateConfirmLoading: (loading: boolean) => void;
|
|
5
5
|
updateCancelLoading: (loading: boolean) => void;
|
|
6
|
-
notifyConfirm: (e:
|
|
7
|
-
notifyCancel: (e:
|
|
6
|
+
notifyConfirm: (e: MouseEvent) => unknown;
|
|
7
|
+
notifyCancel: (e: MouseEvent) => unknown;
|
|
8
8
|
notifyVisibleChange: (visible: boolean) => void;
|
|
9
9
|
focusCancelButton: () => void;
|
|
10
10
|
focusOkButton: () => void;
|
|
@@ -27,12 +27,12 @@ export interface PopconfirmBaseState {
|
|
|
27
27
|
}
|
|
28
28
|
export default class PopConfirmFoundation<P extends PopconfirmBaseProps = PopconfirmBaseProps, S extends PopconfirmBaseState = PopconfirmBaseState> extends BaseFoundation<PopconfirmAdapter<P, S>, P, S> {
|
|
29
29
|
#private;
|
|
30
|
-
handleCancel(e:
|
|
31
|
-
handleConfirm(e:
|
|
32
|
-
handleVisibleChange(visible: boolean)
|
|
30
|
+
handleCancel: (e: MouseEvent) => void;
|
|
31
|
+
handleConfirm: (e: MouseEvent) => void;
|
|
32
|
+
handleVisibleChange: (visible: boolean) => void;
|
|
33
33
|
/** Hosts call this when the popup really opens, whoever set `visible` */
|
|
34
|
-
handlePopupOpen()
|
|
34
|
+
handlePopupOpen: () => void;
|
|
35
35
|
/** Hosts call this when the popup really closes, whoever set `visible`; the card is still mounted */
|
|
36
|
-
handlePopupClose()
|
|
36
|
+
handlePopupClose: () => void;
|
|
37
37
|
}
|
|
38
38
|
export {};
|
|
@@ -4,54 +4,54 @@ import isPromise from "../utils/is-promise.js";
|
|
|
4
4
|
var PopConfirmFoundation = class extends BaseFoundation {
|
|
5
5
|
#closeCount = 0;
|
|
6
6
|
#isOpen() {
|
|
7
|
-
return Boolean(this.
|
|
7
|
+
return Boolean(this.isControlledComponent("visible") ? this.getProps().visible : this.getStates().visible);
|
|
8
8
|
}
|
|
9
9
|
#closeIfUnchanged(closeCountAtStart) {
|
|
10
10
|
if (closeCountAtStart === this.#closeCount && this.#isOpen()) this.handleVisibleChange(false);
|
|
11
11
|
}
|
|
12
|
-
handleCancel(e) {
|
|
12
|
+
handleCancel = (e) => {
|
|
13
13
|
if (this.getStates().cancelLoading) return;
|
|
14
14
|
const closeCountAtStart = this.#closeCount;
|
|
15
|
-
const maybePromise = this.
|
|
15
|
+
const maybePromise = this.adapter.notifyCancel(e);
|
|
16
16
|
if (isPromise(maybePromise)) {
|
|
17
|
-
this.
|
|
17
|
+
this.adapter.updateCancelLoading(true);
|
|
18
18
|
maybePromise.then(() => {
|
|
19
19
|
this.#closeIfUnchanged(closeCountAtStart);
|
|
20
|
-
this.
|
|
20
|
+
this.adapter.updateCancelLoading(false);
|
|
21
21
|
}, () => {
|
|
22
|
-
this.
|
|
22
|
+
this.adapter.updateCancelLoading(false);
|
|
23
23
|
});
|
|
24
24
|
} else this.handleVisibleChange(false);
|
|
25
|
-
}
|
|
26
|
-
handleConfirm(e) {
|
|
25
|
+
};
|
|
26
|
+
handleConfirm = (e) => {
|
|
27
27
|
const closeCountAtStart = this.#closeCount;
|
|
28
|
-
const maybePromise = this.
|
|
28
|
+
const maybePromise = this.adapter.notifyConfirm(e);
|
|
29
29
|
if (isPromise(maybePromise)) {
|
|
30
|
-
this.
|
|
30
|
+
this.adapter.updateConfirmLoading(true);
|
|
31
31
|
maybePromise.then(() => {
|
|
32
|
-
this.
|
|
32
|
+
this.adapter.updateConfirmLoading(false);
|
|
33
33
|
this.#closeIfUnchanged(closeCountAtStart);
|
|
34
34
|
}, () => {
|
|
35
|
-
this.
|
|
35
|
+
this.adapter.updateConfirmLoading(false);
|
|
36
36
|
});
|
|
37
37
|
} else this.handleVisibleChange(false);
|
|
38
|
-
}
|
|
39
|
-
handleVisibleChange(visible) {
|
|
40
|
-
if (!this.
|
|
38
|
+
};
|
|
39
|
+
handleVisibleChange = (visible) => {
|
|
40
|
+
if (!this.isControlledComponent("visible") || !visible) this.adapter.setVisible(visible);
|
|
41
41
|
if (!visible) this.#closeCount++;
|
|
42
|
-
this.
|
|
43
|
-
}
|
|
42
|
+
this.adapter.notifyVisibleChange(visible);
|
|
43
|
+
};
|
|
44
44
|
/** Hosts call this when the popup really opens, whoever set `visible` */
|
|
45
|
-
handlePopupOpen() {
|
|
46
|
-
const { cancelButtonProps, okButtonProps } = this.
|
|
47
|
-
if (cancelButtonProps?.autoFocus && !cancelButtonProps.disabled) this.
|
|
48
|
-
else if (okButtonProps?.autoFocus && !okButtonProps.disabled) this.
|
|
49
|
-
}
|
|
45
|
+
handlePopupOpen = () => {
|
|
46
|
+
const { cancelButtonProps, okButtonProps } = this.adapter.getProps();
|
|
47
|
+
if (cancelButtonProps?.autoFocus && !cancelButtonProps.disabled) this.adapter.focusCancelButton();
|
|
48
|
+
else if (okButtonProps?.autoFocus && !okButtonProps.disabled) this.adapter.focusOkButton();
|
|
49
|
+
};
|
|
50
50
|
/** Hosts call this when the popup really closes, whoever set `visible`; the card is still mounted */
|
|
51
|
-
handlePopupClose() {
|
|
52
|
-
this.
|
|
51
|
+
handlePopupClose = () => {
|
|
52
|
+
this.adapter.setVisible(false);
|
|
53
53
|
this.#closeCount++;
|
|
54
|
-
this.
|
|
55
|
-
}
|
|
54
|
+
this.adapter.focusPrevFocusElement();
|
|
55
|
+
};
|
|
56
56
|
};
|
|
57
57
|
export { PopConfirmFoundation as default };
|
|
@@ -67,12 +67,12 @@ export default class RadioFoundation<P extends RadioBaseProps = RadioBaseProps,
|
|
|
67
67
|
static deriveView(props: RadioBaseProps, state: RadioBaseState, context?: RadioContextView | null): RadioView;
|
|
68
68
|
init(): void;
|
|
69
69
|
destroy(): void;
|
|
70
|
-
setChecked(checked: boolean)
|
|
70
|
+
setChecked: (checked: boolean) => void;
|
|
71
71
|
/** `checked` is the value the native input reports, or false for the uncheck of advanced mode */
|
|
72
|
-
handleChange(checked: boolean, e: RadioSourceEvent)
|
|
73
|
-
handleClick(e: RadioSourceEvent)
|
|
74
|
-
handleKeyUp(e: RadioSourceEvent & {
|
|
72
|
+
handleChange: (checked: boolean, e: RadioSourceEvent) => void;
|
|
73
|
+
handleClick: (e: RadioSourceEvent) => void;
|
|
74
|
+
handleKeyUp: (e: RadioSourceEvent & {
|
|
75
75
|
key: string;
|
|
76
|
-
})
|
|
76
|
+
}) => void;
|
|
77
77
|
}
|
|
78
78
|
export {};
|
|
@@ -7,14 +7,14 @@ var RadioFoundation = class RadioFoundation extends BaseFoundation {
|
|
|
7
7
|
return RadioFoundation.deriveView(this.getProps(), this.getStates(), this.getContexts());
|
|
8
8
|
}
|
|
9
9
|
#isStandalone() {
|
|
10
|
-
return !this.getContexts()?.radioGroup && !this.
|
|
10
|
+
return !this.getContexts()?.radioGroup && !this.isControlledComponent("checked");
|
|
11
11
|
}
|
|
12
12
|
/** Unchecks, without notifying, the standalone radios that share this one's native group (same form and name) */
|
|
13
13
|
#uncheckPeers() {
|
|
14
|
-
const input = this.
|
|
14
|
+
const input = this.adapter.getInput();
|
|
15
15
|
if (!input?.name || !this.#isStandalone()) return;
|
|
16
16
|
for (const peer of RadioFoundation.#standalone) {
|
|
17
|
-
const peerInput = peer.
|
|
17
|
+
const peerInput = peer.adapter.getInput();
|
|
18
18
|
if (peer !== this && peer.#isStandalone() && peerInput?.name === input.name && peerInput.form === input.form && peerInput.getRootNode() === input.getRootNode() && peer.getState("checked")) peer.setChecked(false);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -54,11 +54,11 @@ var RadioFoundation = class RadioFoundation extends BaseFoundation {
|
|
|
54
54
|
destroy() {
|
|
55
55
|
RadioFoundation.#standalone.delete(this);
|
|
56
56
|
}
|
|
57
|
-
setChecked(checked) {
|
|
58
|
-
this.
|
|
59
|
-
}
|
|
57
|
+
setChecked = (checked) => {
|
|
58
|
+
this.adapter.setChecked(checked);
|
|
59
|
+
};
|
|
60
60
|
/** `checked` is the value the native input reports, or false for the uncheck of advanced mode */
|
|
61
|
-
handleChange(checked, e) {
|
|
61
|
+
handleChange = (checked, e) => {
|
|
62
62
|
const props = this.getProps();
|
|
63
63
|
const group = this.getContexts()?.radioGroup;
|
|
64
64
|
const event = {
|
|
@@ -72,23 +72,23 @@ var RadioFoundation = class RadioFoundation extends BaseFoundation {
|
|
|
72
72
|
stopPropagation: () => e.stopPropagation(),
|
|
73
73
|
preventDefault: () => e.preventDefault()
|
|
74
74
|
};
|
|
75
|
-
this.
|
|
76
|
-
if (!this.
|
|
75
|
+
this.adapter.notifyGroupChange(event);
|
|
76
|
+
if (!this.isControlledComponent("checked")) {
|
|
77
77
|
if (checked) this.#uncheckPeers();
|
|
78
78
|
this.setChecked(checked);
|
|
79
79
|
}
|
|
80
|
-
this.
|
|
81
|
-
}
|
|
82
|
-
handleClick(e) {
|
|
80
|
+
this.adapter.notifyChange(event);
|
|
81
|
+
};
|
|
82
|
+
handleClick = (e) => {
|
|
83
83
|
const { checked, mode } = this.#getView();
|
|
84
84
|
if (mode === "advanced" && checked) this.handleChange(false, e);
|
|
85
|
-
}
|
|
86
|
-
handleKeyUp(e) {
|
|
85
|
+
};
|
|
86
|
+
handleKeyUp = (e) => {
|
|
87
87
|
const { checked, mode } = this.#getView();
|
|
88
88
|
if (e.key === " " && mode === "advanced" && checked) {
|
|
89
89
|
e.preventDefault();
|
|
90
90
|
this.handleChange(false, e);
|
|
91
91
|
}
|
|
92
|
-
}
|
|
92
|
+
};
|
|
93
93
|
};
|
|
94
94
|
export { RadioFoundation as default };
|
|
@@ -13,6 +13,6 @@ export interface RadioGroupBaseState {
|
|
|
13
13
|
value?: any;
|
|
14
14
|
}
|
|
15
15
|
export default class RadioGroupFoundation<P extends RadioGroupBaseProps = RadioGroupBaseProps, S extends RadioGroupBaseState = RadioGroupBaseState> extends BaseFoundation<RadioGroupAdapter<P, S>, P, S> {
|
|
16
|
-
handleChange(evt: RadioChangeEvent)
|
|
17
|
-
handlePropValueChange(propValue: string | number | boolean)
|
|
16
|
+
handleChange: (evt: RadioChangeEvent) => void;
|
|
17
|
+
handlePropValueChange: (propValue: string | number | boolean) => void;
|
|
18
18
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import BaseFoundation from "../base/foundation.js";
|
|
2
2
|
// src/radio/radio-group-foundation.ts
|
|
3
3
|
var RadioGroupFoundation = class extends BaseFoundation {
|
|
4
|
-
handleChange(evt) {
|
|
4
|
+
handleChange = (evt) => {
|
|
5
5
|
const mode = this.getProp("mode");
|
|
6
6
|
const lastValue = this.getState("value");
|
|
7
7
|
const { checked, value } = evt.target;
|
|
8
|
-
const isControlledComponent = this.
|
|
8
|
+
const isControlledComponent = this.isControlledComponent();
|
|
9
9
|
const cbValue = {
|
|
10
10
|
...evt,
|
|
11
11
|
target: {
|
|
@@ -15,13 +15,13 @@ var RadioGroupFoundation = class extends BaseFoundation {
|
|
|
15
15
|
};
|
|
16
16
|
if (mode === "advanced" && !checked) cbValue.target.value = void 0;
|
|
17
17
|
if (!isControlledComponent) {
|
|
18
|
-
if (mode === "advanced" && !checked) this.
|
|
19
|
-
else this.
|
|
18
|
+
if (mode === "advanced" && !checked) this.adapter.setValue(void 0);
|
|
19
|
+
else this.adapter.setValue(value);
|
|
20
20
|
}
|
|
21
|
-
if (mode === "advanced" || lastValue !== value) this.
|
|
22
|
-
}
|
|
23
|
-
handlePropValueChange(propValue) {
|
|
24
|
-
this.
|
|
25
|
-
}
|
|
21
|
+
if (mode === "advanced" || lastValue !== value) this.adapter.notifyChange(cbValue);
|
|
22
|
+
};
|
|
23
|
+
handlePropValueChange = (propValue) => {
|
|
24
|
+
this.adapter.setValue(propValue);
|
|
25
|
+
};
|
|
26
26
|
};
|
|
27
27
|
export { RadioGroupFoundation as default };
|
|
@@ -92,18 +92,18 @@ export default class RatingFoundation<P extends RatingBaseProps = RatingBaseProp
|
|
|
92
92
|
static isTipVisible(index: number, hoverValue?: number, focusVisibleStar?: number, tip?: string): boolean;
|
|
93
93
|
init(): void;
|
|
94
94
|
/** A value prop that goes back to undefined (a form reset) returns to defaultValue, like Slider (Switch and Checkbox become unchecked) */
|
|
95
|
-
resetValue()
|
|
96
|
-
handleHover(event: Pick<MouseEvent,
|
|
97
|
-
handleMouseLeave()
|
|
98
|
-
handleClick(event: CE & Pick<MouseEvent,
|
|
95
|
+
resetValue: () => void;
|
|
96
|
+
handleHover: (event: Pick<MouseEvent, "pageX">, index: number) => void;
|
|
97
|
+
handleMouseLeave: () => void;
|
|
98
|
+
handleClick: (event: CE & Pick<MouseEvent, "pageX">, index: number) => void;
|
|
99
99
|
/** Commits `newValue` for the star at `index`; selecting the current value clears it when allowClear is on */
|
|
100
|
-
handleSelect(event: CE, index: number, newValue: number)
|
|
101
|
-
handleFocus(e: FE)
|
|
100
|
+
handleSelect: (event: CE, index: number, newValue: number) => void;
|
|
101
|
+
handleFocus: (e: FE) => void;
|
|
102
102
|
/** A radio of the star at `index` got focus; index === count is the empty star */
|
|
103
|
-
handleStarFocus(e: {
|
|
103
|
+
handleStarFocus: (e: {
|
|
104
104
|
target: Element;
|
|
105
|
-
}, index: number)
|
|
106
|
-
handleBlur(e: FE)
|
|
107
|
-
handleKeyDown(event: KE, value: number)
|
|
105
|
+
}, index: number) => void;
|
|
106
|
+
handleBlur: (e: FE) => void;
|
|
107
|
+
handleKeyDown: (event: KE, value: number) => void;
|
|
108
108
|
}
|
|
109
109
|
export {};
|
|
@@ -6,20 +6,20 @@ var RatingFoundation = class RatingFoundation extends BaseFoundation {
|
|
|
6
6
|
return el.getBoundingClientRect().left + el.ownerDocument.defaultView.scrollX;
|
|
7
7
|
}
|
|
8
8
|
#changeHover(hoverValue, clearedValue) {
|
|
9
|
-
this.
|
|
10
|
-
this.
|
|
9
|
+
this.adapter.setHover(hoverValue, clearedValue);
|
|
10
|
+
this.adapter.notifyHoverChange(hoverValue);
|
|
11
11
|
}
|
|
12
12
|
#updateValue(value) {
|
|
13
|
-
if (!this.
|
|
14
|
-
this.
|
|
13
|
+
if (!this.isControlledComponent()) this.adapter.setValue(value);
|
|
14
|
+
this.adapter.notifyChange(value);
|
|
15
15
|
}
|
|
16
16
|
getStarValue(index, pos) {
|
|
17
17
|
const { allowHalf, count } = this.getProps();
|
|
18
18
|
if (index === count) return 0;
|
|
19
|
-
const reverse = this.
|
|
19
|
+
const reverse = this.adapter.getContext("direction") === "rtl";
|
|
20
20
|
let value = index + 1;
|
|
21
21
|
if (allowHalf) {
|
|
22
|
-
const starEle = this.
|
|
22
|
+
const starEle = this.adapter.getStarDOM(index);
|
|
23
23
|
if (!starEle) return value;
|
|
24
24
|
const leftDis = this.#getOffsetLeft(starEle);
|
|
25
25
|
const width = starEle.clientWidth;
|
|
@@ -93,51 +93,51 @@ var RatingFoundation = class RatingFoundation extends BaseFoundation {
|
|
|
93
93
|
if (this.#initialized) return;
|
|
94
94
|
this.#initialized = true;
|
|
95
95
|
const { autoFocus, disabled } = this.getProps();
|
|
96
|
-
if (autoFocus && !disabled) this.
|
|
96
|
+
if (autoFocus && !disabled) this.adapter.focusStar(RatingFoundation.deriveValue(this.getProps(), this.getStates()));
|
|
97
97
|
}
|
|
98
98
|
/** A value prop that goes back to undefined (a form reset) returns to defaultValue, like Slider (Switch and Checkbox become unchecked) */
|
|
99
|
-
resetValue() {
|
|
100
|
-
this.
|
|
101
|
-
}
|
|
102
|
-
handleHover(event, index) {
|
|
99
|
+
resetValue = () => {
|
|
100
|
+
this.adapter.setValue(this.getProps().defaultValue);
|
|
101
|
+
};
|
|
102
|
+
handleHover = (event, index) => {
|
|
103
103
|
const currValue = this.getStarValue(index, event.pageX);
|
|
104
104
|
const { clearedValue, hoverValue } = this.getStates();
|
|
105
105
|
if (currValue !== hoverValue && currValue !== clearedValue) this.#changeHover(currValue, null);
|
|
106
|
-
}
|
|
107
|
-
handleMouseLeave() {
|
|
106
|
+
};
|
|
107
|
+
handleMouseLeave = () => {
|
|
108
108
|
this.#changeHover(void 0, null);
|
|
109
|
-
}
|
|
110
|
-
handleClick(event, index) {
|
|
109
|
+
};
|
|
110
|
+
handleClick = (event, index) => {
|
|
111
111
|
this.handleSelect(event, index, this.getStarValue(index, event.pageX));
|
|
112
|
-
}
|
|
112
|
+
};
|
|
113
113
|
/** Commits `newValue` for the star at `index`; selecting the current value clears it when allowClear is on */
|
|
114
|
-
handleSelect(event, index, newValue) {
|
|
114
|
+
handleSelect = (event, index, newValue) => {
|
|
115
115
|
const { allowClear } = this.getProps();
|
|
116
116
|
const value = RatingFoundation.deriveValue(this.getProps(), this.getStates());
|
|
117
117
|
const isReset = allowClear ? newValue === value : false;
|
|
118
118
|
this.#updateValue(isReset ? 0 : newValue);
|
|
119
119
|
if (isReset) this.#changeHover(void 0, newValue);
|
|
120
|
-
else this.
|
|
121
|
-
this.
|
|
122
|
-
}
|
|
123
|
-
handleFocus(e) {
|
|
124
|
-
if (!e.currentTarget.contains(e.relatedTarget)) this.
|
|
125
|
-
}
|
|
120
|
+
else this.adapter.setClearedValue(null);
|
|
121
|
+
this.adapter.notifyClick(event, index);
|
|
122
|
+
};
|
|
123
|
+
handleFocus = (e) => {
|
|
124
|
+
if (!e.currentTarget.contains(e.relatedTarget)) this.adapter.notifyFocus(e);
|
|
125
|
+
};
|
|
126
126
|
/** A radio of the star at `index` got focus; index === count is the empty star */
|
|
127
|
-
handleStarFocus(e, index) {
|
|
128
|
-
if (e.target.matches(":focus-visible") || this.getStates().focusVisibleStar !== void 0) this.
|
|
129
|
-
}
|
|
130
|
-
handleBlur(e) {
|
|
127
|
+
handleStarFocus = (e, index) => {
|
|
128
|
+
if (e.target.matches(":focus-visible") || this.getStates().focusVisibleStar !== void 0) this.adapter.setFocusVisibleStar(index);
|
|
129
|
+
};
|
|
130
|
+
handleBlur = (e) => {
|
|
131
131
|
if (!e.currentTarget.contains(e.relatedTarget)) {
|
|
132
|
-
this.
|
|
133
|
-
this.
|
|
132
|
+
this.adapter.notifyBlur(e);
|
|
133
|
+
this.adapter.setFocusVisibleStar(void 0);
|
|
134
134
|
}
|
|
135
|
-
}
|
|
136
|
-
handleKeyDown(event, value) {
|
|
135
|
+
};
|
|
136
|
+
handleKeyDown = (event, value) => {
|
|
137
137
|
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
|
138
138
|
const { key } = event;
|
|
139
139
|
const { count, allowHalf } = this.getProps();
|
|
140
|
-
const reverse = this.
|
|
140
|
+
const reverse = this.adapter.getContext("direction") === "rtl";
|
|
141
141
|
const step = allowHalf ? .5 : 1;
|
|
142
142
|
const next = (Math.floor(value / step) + 1) * step;
|
|
143
143
|
const previous = (Math.ceil(value / step) - 1) * step;
|
|
@@ -156,12 +156,12 @@ var RatingFoundation = class RatingFoundation extends BaseFoundation {
|
|
|
156
156
|
"ArrowLeft",
|
|
157
157
|
"ArrowDown"
|
|
158
158
|
].includes(key)) {
|
|
159
|
-
this.
|
|
159
|
+
this.adapter.notifyKeyDown(event);
|
|
160
160
|
this.#updateValue(newValue);
|
|
161
|
-
this.
|
|
161
|
+
this.adapter.focusStar(newValue);
|
|
162
162
|
event.preventDefault();
|
|
163
163
|
this.#changeHover(void 0, null);
|
|
164
164
|
}
|
|
165
|
-
}
|
|
165
|
+
};
|
|
166
166
|
};
|
|
167
167
|
export { RatingFoundation as default };
|
|
@@ -37,19 +37,19 @@ export declare class ResizeGroupFoundation<P extends ResizeGroupBaseProps = Resi
|
|
|
37
37
|
/**
|
|
38
38
|
* Re-runs initSpace the first time the group is measurable (#3336); later resizes must not, or the drag is lost.
|
|
39
39
|
*/
|
|
40
|
-
handleGroupResize()
|
|
40
|
+
handleGroupResize: () => void;
|
|
41
41
|
/**
|
|
42
42
|
* Moves each item's inline size to the new axis, where the handlers take a different length
|
|
43
43
|
*/
|
|
44
|
-
handleDirectionChange()
|
|
44
|
+
handleDirectionChange: () => void;
|
|
45
45
|
/**
|
|
46
46
|
* Keyboard resize, reported like a drag: arrows move 1% of the group (Shift: 10%), Home and End go to the
|
|
47
47
|
* limits. Returns whether the key was handled.
|
|
48
48
|
*/
|
|
49
|
-
resizeByKey(handlerIndex: number, e: KeyboardEvent)
|
|
50
|
-
onResizeStart(handlerIndex: number, e: PointerEvent)
|
|
51
|
-
onResizing(e: PointerEvent)
|
|
52
|
-
onResizeEnd(e: PointerEvent)
|
|
49
|
+
resizeByKey: (handlerIndex: number, e: KeyboardEvent) => boolean;
|
|
50
|
+
onResizeStart: (handlerIndex: number, e: PointerEvent) => void;
|
|
51
|
+
onResizing: (e: PointerEvent) => void;
|
|
52
|
+
onResizeEnd: (e: PointerEvent) => void;
|
|
53
53
|
ensureConstraint: import("es-toolkit").DebouncedFunction<() => void>;
|
|
54
54
|
destroy(): void;
|
|
55
55
|
}
|