@fibrae/semi-foundation 0.1.0 → 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 +17 -17
- 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
|
@@ -116,7 +116,7 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
|
|
|
116
116
|
static getValidTimeFormat(format?: string): string;
|
|
117
117
|
static getValidDateFormat(props: Pick<MonthsGridFoundationProps, 'format' | 'type'>): string;
|
|
118
118
|
/** The disabled hours, minutes and seconds `disabledTime` gives the time panel of `panelType` */
|
|
119
|
-
static calcDisabledTime({ disabledTime, type }: Pick<MonthsGridFoundationProps, 'disabledTime' | 'type'>,
|
|
119
|
+
static calcDisabledTime({ disabledTime, type }: Pick<MonthsGridFoundationProps, 'disabledTime' | 'type'>, { rangeStart, rangeEnd, monthLeft }: Pick<MonthsGridFoundationState, 'rangeStart' | 'rangeEnd' | 'monthLeft'>, panelType: PanelType): {
|
|
120
120
|
disabledHours?: () => number[];
|
|
121
121
|
disabledMinutes?: (hour: number) => number[];
|
|
122
122
|
disabledSeconds?: (hour: number, minute: number) => number[];
|
|
@@ -125,7 +125,7 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
|
|
|
125
125
|
* Which panels show their year and month picker; while one does, its weeks need a minHeight, or a change of the
|
|
126
126
|
* number of weeks makes the scroll list unstable
|
|
127
127
|
*/
|
|
128
|
-
static getYAMOpenType(state: Pick<MonthsGridFoundationState, 'monthLeft' | 'monthRight'>): "left" | "right" | "
|
|
128
|
+
static getYAMOpenType(state: Pick<MonthsGridFoundationState, 'monthLeft' | 'monthRight'>): "left" | "right" | "none" | "both";
|
|
129
129
|
/** The panel shows a scroll list, its year and month picker or its time picker, instead of the month */
|
|
130
130
|
static isYearOrTime(panel: PanelState): boolean;
|
|
131
131
|
/** The `x-open-type` of a panel: what it shows in place of, or beside, its month */
|
|
@@ -159,22 +159,22 @@ export default class MonthsGridFoundation extends BaseFoundation<MonthsGridAdapt
|
|
|
159
159
|
}>;
|
|
160
160
|
init(): void;
|
|
161
161
|
/** Moves the panels when `defaultPickerValue` changes; the first value is applied by getInitialState */
|
|
162
|
-
initDefaultPickerValue()
|
|
163
|
-
updateSelectedFromProps(values: (Date | null)[], refreshPicker?: boolean)
|
|
164
|
-
toYearMonth(panelType: PanelType, target: Date)
|
|
165
|
-
prevMonth(panelType: PanelType)
|
|
166
|
-
nextMonth(panelType: PanelType)
|
|
167
|
-
prevYear(panelType: PanelType)
|
|
168
|
-
nextYear(panelType: PanelType)
|
|
169
|
-
handleDayClick(day: MonthDayInfo, panelType: PanelType)
|
|
170
|
-
handleDayHover({ fullDate }?: {
|
|
162
|
+
initDefaultPickerValue: () => void;
|
|
163
|
+
updateSelectedFromProps: (values: (Date | null)[], refreshPicker?: boolean) => void;
|
|
164
|
+
toYearMonth: (panelType: PanelType, target: Date) => void;
|
|
165
|
+
prevMonth: (panelType: PanelType) => void;
|
|
166
|
+
nextMonth: (panelType: PanelType) => void;
|
|
167
|
+
prevYear: (panelType: PanelType) => void;
|
|
168
|
+
nextYear: (panelType: PanelType) => void;
|
|
169
|
+
handleDayClick: (day: MonthDayInfo, panelType: PanelType) => void;
|
|
170
|
+
handleDayHover: ({ fullDate }?: {
|
|
171
171
|
fullDate: string;
|
|
172
|
-
})
|
|
173
|
-
handleTimeChange(newTime: {
|
|
172
|
+
}) => void;
|
|
173
|
+
handleTimeChange: (newTime: {
|
|
174
174
|
timeStampValue: number;
|
|
175
|
-
}, panelType: PanelType)
|
|
176
|
-
showYearPicker(panelType: PanelType)
|
|
177
|
-
showTimePicker(panelType: PanelType)
|
|
178
|
-
showDatePanel(panelType: PanelType)
|
|
175
|
+
}, panelType: PanelType) => void;
|
|
176
|
+
showYearPicker: (panelType: PanelType) => void;
|
|
177
|
+
showTimePicker: (panelType: PanelType) => void;
|
|
178
|
+
showDatePanel: (panelType: PanelType) => void;
|
|
179
179
|
}
|
|
180
180
|
export {};
|
|
@@ -24,9 +24,9 @@ const dateCalcFns = {
|
|
|
24
24
|
};
|
|
25
25
|
var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
26
26
|
#initDatePickerFromValue(values, refreshPicker = true) {
|
|
27
|
-
const { monthLeft } = this.
|
|
27
|
+
const { monthLeft } = this.adapter.getStates();
|
|
28
28
|
const newMonthLeft = { ...monthLeft };
|
|
29
|
-
this.
|
|
29
|
+
this.adapter.updateMonthOnLeft(newMonthLeft);
|
|
30
30
|
const newSelected = /* @__PURE__ */ new Set();
|
|
31
31
|
const isMultiple = this.#isMultiple();
|
|
32
32
|
if (!isMultiple) {
|
|
@@ -39,7 +39,7 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
39
39
|
if (!values?.some((item) => item && differenceInCalendarMonths(item, monthLeft.pickerDate) === 0)) this.#handleShowDateAndTime(strings.PANEL_TYPE_LEFT, values[0] || newMonthLeft.pickerDate);
|
|
40
40
|
} else this.#handleShowDateAndTime(strings.PANEL_TYPE_LEFT, values[0] || newMonthLeft.pickerDate);
|
|
41
41
|
} else this.#handleShowDateAndTime(strings.PANEL_TYPE_LEFT, newMonthLeft.pickerDate);
|
|
42
|
-
this.
|
|
42
|
+
this.adapter.updateDaySelected(newSelected);
|
|
43
43
|
}
|
|
44
44
|
#initDateRangePickerFromValue(values, withTime = false) {
|
|
45
45
|
const monthLeft = this.getState("monthLeft");
|
|
@@ -69,9 +69,9 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
69
69
|
let rangeStart = values[0] ? format(values[0], formatToken) : "";
|
|
70
70
|
let rangeEnd = values[1] ? format(values[1], formatToken) : "";
|
|
71
71
|
if (this.#isNeedSwap(rangeStart, rangeEnd)) [rangeStart, rangeEnd] = [rangeEnd, rangeStart];
|
|
72
|
-
this.
|
|
73
|
-
this.
|
|
74
|
-
this.
|
|
72
|
+
this.adapter.setRangeStart(rangeStart);
|
|
73
|
+
this.adapter.setRangeEnd(rangeEnd);
|
|
74
|
+
this.adapter.setHoverDay(rangeEnd);
|
|
75
75
|
}
|
|
76
76
|
#initDateTimePickerFromValue(values) {
|
|
77
77
|
this.#initDatePickerFromValue(values);
|
|
@@ -90,7 +90,7 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
90
90
|
return isMultiple(this.getProps());
|
|
91
91
|
}
|
|
92
92
|
#mergeDateAndTime(date, time) {
|
|
93
|
-
const dateFnsLocale = this.
|
|
93
|
+
const dateFnsLocale = this.adapter.getProp("dateFnsLocale");
|
|
94
94
|
const day = isValidDate(date) ? date : compatibleParse(date, strings.FORMAT_FULL_DATE, void 0, dateFnsLocale);
|
|
95
95
|
return set(day, {
|
|
96
96
|
hours: time.getHours(),
|
|
@@ -136,7 +136,7 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
136
136
|
[rangeStart, rangeEnd] = [rangeEnd, rangeStart];
|
|
137
137
|
[startDate, endDate] = [endDate, startDate];
|
|
138
138
|
}
|
|
139
|
-
if (!isControlledComponent) this.
|
|
139
|
+
if (!isControlledComponent) this.adapter.setRangeEnd(rangeEnd);
|
|
140
140
|
} else {
|
|
141
141
|
startDate = this.#mergeDateAndTime(timeDate, timeDate);
|
|
142
142
|
rangeStart = format(startDate, strings.FORMAT_DATE_TIME);
|
|
@@ -144,24 +144,24 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
144
144
|
[rangeStart, rangeEnd] = [rangeEnd, rangeStart];
|
|
145
145
|
[startDate, endDate] = [endDate, startDate];
|
|
146
146
|
}
|
|
147
|
-
if (!isControlledComponent) this.
|
|
147
|
+
if (!isControlledComponent) this.adapter.setRangeStart(rangeStart);
|
|
148
148
|
}
|
|
149
|
-
this.
|
|
149
|
+
this.adapter.notifySelectedChange([startDate, endDate]);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
#updatePanelDetail(panelType, kvs) {
|
|
153
153
|
const { monthLeft, monthRight } = this.getStates();
|
|
154
|
-
if (panelType === strings.PANEL_TYPE_RIGHT) this.
|
|
154
|
+
if (panelType === strings.PANEL_TYPE_RIGHT) this.adapter.updateMonthOnRight({
|
|
155
155
|
...monthRight,
|
|
156
156
|
...kvs
|
|
157
157
|
});
|
|
158
|
-
else this.
|
|
158
|
+
else this.adapter.updateMonthOnLeft({
|
|
159
159
|
...monthLeft,
|
|
160
160
|
...kvs
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
163
|
#toMonth(panelType, target) {
|
|
164
|
-
const { type } = this.
|
|
164
|
+
const { type } = this.adapter.getProps();
|
|
165
165
|
const diff = this.#getDiff("month", target, panelType);
|
|
166
166
|
this.#handleYearOrMonthChange(diff < 0 ? "prevMonth" : "nextMonth", panelType, Math.abs(diff), false);
|
|
167
167
|
if (isRangeType(type)) this.handleSyncChangeMonths({
|
|
@@ -186,11 +186,11 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
186
186
|
if (panelDateHasUpdate) {
|
|
187
187
|
if (!isRange) {
|
|
188
188
|
const { notifyValue, notifyDate } = toCallbackArgs(targetMonth, this.getProps());
|
|
189
|
-
this.
|
|
189
|
+
this.adapter.notifyPanelChange(notifyDate, notifyValue);
|
|
190
190
|
} else if (!(isLeftPanelInRange && notSeparateInRange)) {
|
|
191
191
|
const states = this.getStates();
|
|
192
192
|
const { notifyValue, notifyDate } = toCallbackArgs([states.monthLeft.pickerDate, states.monthRight.pickerDate], this.getProps());
|
|
193
|
-
this.
|
|
193
|
+
this.adapter.notifyPanelChange(notifyDate, notifyValue);
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
if (autoSwitchDate) this.#updateDateAfterChangeYM(type, targetMonth);
|
|
@@ -213,7 +213,7 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
213
213
|
rangeStart,
|
|
214
214
|
rangeEnd
|
|
215
215
|
})) return;
|
|
216
|
-
this.
|
|
216
|
+
this.adapter.notifySelectedChange([fullDate], options);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
#handleDateSelected(day, panelType) {
|
|
@@ -230,8 +230,8 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
230
230
|
else if (!max || newSelected.size < max) newSelected.add(dateStr);
|
|
231
231
|
const newSelectedDates = [...newSelected].map((_dateStr) => type === "dateTime" ? this.#mergeDateAndTime(_dateStr, time) : compatibleParse(_dateStr, strings.FORMAT_FULL_DATE, void 0, dateFnsLocale));
|
|
232
232
|
this.#handleShowDateAndTime(panelType, time);
|
|
233
|
-
if (!isControlledComponent) this.
|
|
234
|
-
this.
|
|
233
|
+
if (!isControlledComponent) this.adapter.updateDaySelected(newSelected);
|
|
234
|
+
this.adapter.notifySelectedChange(newSelectedDates);
|
|
235
235
|
}
|
|
236
236
|
#handleShowDateAndTime(panelType, pickerDate, showDate) {
|
|
237
237
|
const _showDate = showDate || pickerDate;
|
|
@@ -242,7 +242,7 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
242
242
|
}
|
|
243
243
|
#handleRangeSelected({ fullDate }) {
|
|
244
244
|
let { rangeStart, rangeEnd } = this.getStates();
|
|
245
|
-
const { startDateOffset, endDateOffset, type, dateFnsLocale, rangeInputFocus } = this.
|
|
245
|
+
const { startDateOffset, endDateOffset, type, dateFnsLocale, rangeInputFocus } = this.adapter.getProps();
|
|
246
246
|
let rangeStartReset = false;
|
|
247
247
|
let rangeEndReset = false;
|
|
248
248
|
const isDateRangeAndHasOffset = (startDateOffset || endDateOffset) && type === "dateRange";
|
|
@@ -264,16 +264,16 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
264
264
|
}
|
|
265
265
|
if (isRangeType(type)) {
|
|
266
266
|
if (isDateRangeAndHasOffset) {
|
|
267
|
-
this.
|
|
268
|
-
this.
|
|
267
|
+
this.adapter.setRangeStart(rangeStart);
|
|
268
|
+
this.adapter.setRangeEnd(rangeEnd);
|
|
269
269
|
} else if (rangeInputFocus === "rangeEnd") {
|
|
270
|
-
this.
|
|
271
|
-
if (rangeStartReset) this.
|
|
272
|
-
if (!this.
|
|
270
|
+
this.adapter.setRangeEnd(rangeEnd);
|
|
271
|
+
if (rangeStartReset) this.adapter.setRangeStart(rangeStart);
|
|
272
|
+
if (!this.adapter.hasOtherRangeInputBeenFocused("rangeEnd") || !rangeStart) this.adapter.setRangeInputFocus("rangeStart");
|
|
273
273
|
} else if (rangeInputFocus === "rangeStart" || !rangeInputFocus) {
|
|
274
|
-
this.
|
|
275
|
-
if (rangeEndReset) this.
|
|
276
|
-
if (!this.
|
|
274
|
+
this.adapter.setRangeStart(rangeStart);
|
|
275
|
+
if (rangeEndReset) this.adapter.setRangeEnd(rangeEnd);
|
|
276
|
+
if (!this.adapter.hasOtherRangeInputBeenFocused("rangeStart") || !rangeEnd) this.adapter.setRangeInputFocus("rangeEnd");
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
const dateFormat = MonthsGridFoundation.getValidDateFormat(this.getProps());
|
|
@@ -289,7 +289,7 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
289
289
|
else date = [start, end];
|
|
290
290
|
}
|
|
291
291
|
const needCheckFocusRecord = !(type === "dateRange" && isDateRangeAndHasOffset);
|
|
292
|
-
this.
|
|
292
|
+
this.adapter.notifySelectedChange(date, {
|
|
293
293
|
needCheckFocusRecord,
|
|
294
294
|
rangeInputFocus
|
|
295
295
|
});
|
|
@@ -303,15 +303,15 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
303
303
|
* - panelType=left, target=new Date('2021-12-01') and right panel is in '2021-12' => call it, right panel add one month to '2021-01'
|
|
304
304
|
*/
|
|
305
305
|
handleSyncChangeMonths({ panelType, target }) {
|
|
306
|
-
const { type } = this.
|
|
307
|
-
const { monthLeft, monthRight } = this.
|
|
306
|
+
const { type } = this.adapter.getProps();
|
|
307
|
+
const { monthLeft, monthRight } = this.adapter.getStates();
|
|
308
308
|
if (isRangeType(type)) {
|
|
309
309
|
if (panelType === "right" && differenceInCalendarMonths(target, monthLeft.pickerDate) === 0) this.#handleYearOrMonthChange("prevMonth", "left", 1, true);
|
|
310
310
|
else if (panelType === "left" && differenceInCalendarMonths(monthRight.pickerDate, target) === 0) this.#handleYearOrMonthChange("nextMonth", "right", 1, true);
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
getTargetChangeDate({ panelType, switchType }) {
|
|
314
|
-
const { monthRight, monthLeft } = this.
|
|
314
|
+
const { monthRight, monthLeft } = this.adapter.getStates();
|
|
315
315
|
const currentDate = panelType === "left" ? monthLeft.pickerDate : monthRight.pickerDate;
|
|
316
316
|
return dateCalcFns[switchType](currentDate, 1);
|
|
317
317
|
}
|
|
@@ -373,9 +373,8 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
373
373
|
return props.format || getDefaultFormatToken(props.type);
|
|
374
374
|
}
|
|
375
375
|
/** The disabled hours, minutes and seconds `disabledTime` gives the time panel of `panelType` */
|
|
376
|
-
static calcDisabledTime({ disabledTime, type },
|
|
376
|
+
static calcDisabledTime({ disabledTime, type }, { rangeStart, rangeEnd, monthLeft }, panelType) {
|
|
377
377
|
if (typeof disabledTime === "function" && panelType && isDateTimeType(type)) {
|
|
378
|
-
const { rangeStart, rangeEnd, monthLeft } = state;
|
|
379
378
|
const selected = [];
|
|
380
379
|
if (type === "dateTimeRange") {
|
|
381
380
|
if (rangeStart) selected.push(rangeStart);
|
|
@@ -447,7 +446,7 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
447
446
|
this.updateSelectedFromProps(this.getProp("selectedValue"));
|
|
448
447
|
}
|
|
449
448
|
/** Moves the panels when `defaultPickerValue` changes; the first value is applied by getInitialState */
|
|
450
|
-
initDefaultPickerValue() {
|
|
449
|
+
initDefaultPickerValue = () => {
|
|
451
450
|
const { defaultPickerValue, type, format, dateFnsLocale } = this.getProps();
|
|
452
451
|
if (defaultPickerValue === void 0) return;
|
|
453
452
|
const { nowDate, nextDate } = getDefaultPickerDate({
|
|
@@ -459,8 +458,8 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
459
458
|
this.#updatePanelDetail(strings.PANEL_TYPE_LEFT, { pickerDate: nowDate });
|
|
460
459
|
this.#updatePanelDetail(strings.PANEL_TYPE_RIGHT, { pickerDate: nextDate });
|
|
461
460
|
}
|
|
462
|
-
}
|
|
463
|
-
updateSelectedFromProps(values, refreshPicker = true) {
|
|
461
|
+
};
|
|
462
|
+
updateSelectedFromProps = (values, refreshPicker = true) => {
|
|
464
463
|
const type = this.getProp("type");
|
|
465
464
|
const { selected, rangeStart, rangeEnd } = this.getStates();
|
|
466
465
|
if (values && values?.length) switch (type) {
|
|
@@ -476,28 +475,28 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
476
475
|
case "dateTimeRange": this.#initDateTimeRangePickerFormValue(values);
|
|
477
476
|
}
|
|
478
477
|
else if (Array.isArray(values) && !values.length || !values) {
|
|
479
|
-
if (selected instanceof Set && selected.size) this.
|
|
480
|
-
if (rangeStart) this.
|
|
481
|
-
if (rangeEnd) this.
|
|
478
|
+
if (selected instanceof Set && selected.size) this.adapter.updateDaySelected(/* @__PURE__ */ new Set());
|
|
479
|
+
if (rangeStart) this.adapter.setRangeStart("");
|
|
480
|
+
if (rangeEnd) this.adapter.setRangeEnd("");
|
|
482
481
|
}
|
|
483
|
-
}
|
|
484
|
-
toYearMonth(panelType, target) {
|
|
482
|
+
};
|
|
483
|
+
toYearMonth = (panelType, target) => {
|
|
485
484
|
this.#toYear(panelType, target);
|
|
486
485
|
this.#toMonth(panelType, target);
|
|
487
|
-
}
|
|
488
|
-
prevMonth(panelType) {
|
|
486
|
+
};
|
|
487
|
+
prevMonth = (panelType) => {
|
|
489
488
|
this.handleSwitchMonthOrYear("prevMonth", panelType);
|
|
490
|
-
}
|
|
491
|
-
nextMonth(panelType) {
|
|
489
|
+
};
|
|
490
|
+
nextMonth = (panelType) => {
|
|
492
491
|
this.handleSwitchMonthOrYear("nextMonth", panelType);
|
|
493
|
-
}
|
|
494
|
-
prevYear(panelType) {
|
|
492
|
+
};
|
|
493
|
+
prevYear = (panelType) => {
|
|
495
494
|
this.handleSwitchMonthOrYear("prevYear", panelType);
|
|
496
|
-
}
|
|
497
|
-
nextYear(panelType) {
|
|
495
|
+
};
|
|
496
|
+
nextYear = (panelType) => {
|
|
498
497
|
this.handleSwitchMonthOrYear("nextYear", panelType);
|
|
499
|
-
}
|
|
500
|
-
handleDayClick(day, panelType) {
|
|
498
|
+
};
|
|
499
|
+
handleDayClick = (day, panelType) => {
|
|
501
500
|
const type = this.getProp("type");
|
|
502
501
|
switch (true) {
|
|
503
502
|
case type === "date" || type === "dateTime":
|
|
@@ -505,18 +504,18 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
505
504
|
break;
|
|
506
505
|
case type === "dateRange" || type === "dateTimeRange": this.#handleRangeSelected(day);
|
|
507
506
|
}
|
|
508
|
-
}
|
|
509
|
-
handleDayHover({ fullDate } = { fullDate: "" }) {
|
|
507
|
+
};
|
|
508
|
+
handleDayHover = ({ fullDate } = { fullDate: "" }) => {
|
|
510
509
|
const { startDateOffset, endDateOffset, type } = this.getProps();
|
|
511
|
-
this.
|
|
510
|
+
this.adapter.setHoverDay(fullDate);
|
|
512
511
|
if ((startDateOffset || endDateOffset) && type === "dateRange") {
|
|
513
512
|
const offsetRangeStart = getFullDateOffset(startDateOffset, fullDate);
|
|
514
513
|
const offsetRangeEnd = getFullDateOffset(endDateOffset, fullDate);
|
|
515
|
-
this.
|
|
516
|
-
this.
|
|
514
|
+
this.adapter.setOffsetRangeStart(offsetRangeStart);
|
|
515
|
+
this.adapter.setOffsetRangeEnd(offsetRangeEnd);
|
|
517
516
|
}
|
|
518
|
-
}
|
|
519
|
-
handleTimeChange(newTime, panelType) {
|
|
517
|
+
};
|
|
518
|
+
handleTimeChange = (newTime, panelType) => {
|
|
520
519
|
const { rangeEnd, rangeStart } = this.getStates();
|
|
521
520
|
const { type, dateFnsLocale } = this.getProps();
|
|
522
521
|
const { showDate } = this.#getPanelDetail(panelType);
|
|
@@ -533,25 +532,25 @@ var MonthsGridFoundation = class MonthsGridFoundation extends BaseFoundation {
|
|
|
533
532
|
fullValidDate
|
|
534
533
|
}, panelType);
|
|
535
534
|
}
|
|
536
|
-
}
|
|
537
|
-
showYearPicker(panelType) {
|
|
535
|
+
};
|
|
536
|
+
showYearPicker = (panelType) => {
|
|
538
537
|
this.#updatePanelDetail(panelType, {
|
|
539
538
|
isTimePickerOpen: false,
|
|
540
539
|
isYearPickerOpen: true
|
|
541
540
|
});
|
|
542
|
-
}
|
|
543
|
-
showTimePicker(panelType) {
|
|
541
|
+
};
|
|
542
|
+
showTimePicker = (panelType) => {
|
|
544
543
|
if (this.getProp("disabledTimePicker")) return;
|
|
545
544
|
this.#updatePanelDetail(panelType, {
|
|
546
545
|
isTimePickerOpen: true,
|
|
547
546
|
isYearPickerOpen: false
|
|
548
547
|
});
|
|
549
|
-
}
|
|
550
|
-
showDatePanel(panelType) {
|
|
548
|
+
};
|
|
549
|
+
showDatePanel = (panelType) => {
|
|
551
550
|
this.#updatePanelDetail(panelType, {
|
|
552
551
|
isTimePickerOpen: false,
|
|
553
552
|
isYearPickerOpen: false
|
|
554
553
|
});
|
|
555
|
-
}
|
|
554
|
+
};
|
|
556
555
|
};
|
|
557
556
|
export { MonthsGridFoundation as default };
|
|
@@ -68,8 +68,8 @@ export default class YearAndMonthFoundation extends BaseFoundation<YearAndMonthA
|
|
|
68
68
|
static getYearList(props: YearAndMonthFoundationProps, panelType: PanelType): YearScrollItem[];
|
|
69
69
|
/** The month column of a panel; in the right panel of the same year no month may come before the left one */
|
|
70
70
|
static getMonthList(props: YearAndMonthFoundationProps, panelType: PanelType): MonthScrollItem[];
|
|
71
|
-
selectYear(item: YearScrollItem, panelType?: PanelType)
|
|
72
|
-
selectMonth(item: MonthScrollItem, panelType?: PanelType)
|
|
73
|
-
backToMain()
|
|
71
|
+
selectYear: (item: YearScrollItem, panelType?: PanelType) => void;
|
|
72
|
+
selectMonth: (item: MonthScrollItem, panelType?: PanelType) => void;
|
|
73
|
+
backToMain: () => void;
|
|
74
74
|
}
|
|
75
75
|
export {};
|
|
@@ -6,7 +6,7 @@ import getYearAndMonth from "./_utils/get-year-and-month.js";
|
|
|
6
6
|
const MONTHS = Array.from({ length: 12 }, (_v, idx) => idx + 1);
|
|
7
7
|
var YearAndMonthFoundation = class YearAndMonthFoundation extends BaseFoundation {
|
|
8
8
|
#autoSelectMonth(item, panelType, year, currentMonth) {
|
|
9
|
-
const { disabledDate } = this.
|
|
9
|
+
const { disabledDate } = this.adapter.getProps();
|
|
10
10
|
const oppositeType = panelType === strings.PANEL_TYPE_LEFT ? "right" : "left";
|
|
11
11
|
const isValid = (month) => !disabledDate(new Date(item.year, month - 1));
|
|
12
12
|
const isCurrentMonthDisabled = !isValid(currentMonth[panelType]);
|
|
@@ -38,7 +38,7 @@ var YearAndMonthFoundation = class YearAndMonthFoundation extends BaseFoundation
|
|
|
38
38
|
right: currentMonth[panelType]
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
this.
|
|
41
|
+
this.adapter.notifySelect({
|
|
42
42
|
currentYear: finalYear,
|
|
43
43
|
currentMonth: finalMonth
|
|
44
44
|
});
|
|
@@ -77,7 +77,7 @@ var YearAndMonthFoundation = class YearAndMonthFoundation extends BaseFoundation
|
|
|
77
77
|
value: locale.fullMonths[month]
|
|
78
78
|
}));
|
|
79
79
|
}
|
|
80
|
-
selectYear(item, panelType) {
|
|
80
|
+
selectYear = (item, panelType) => {
|
|
81
81
|
const { currentYear, currentMonth } = YearAndMonthFoundation.getYearAndMonth(this.getProps());
|
|
82
82
|
const { type } = this.getProps();
|
|
83
83
|
const left = strings.PANEL_TYPE_LEFT;
|
|
@@ -89,13 +89,13 @@ var YearAndMonthFoundation = class YearAndMonthFoundation extends BaseFoundation
|
|
|
89
89
|
if (panelType === left && item.value > year[right] || panelType === left && isSameYearIllegalDate) year[right] = item.value + 1;
|
|
90
90
|
else if (panelType === right && isSameYearIllegalDate) year[left] = item.value - 1;
|
|
91
91
|
}
|
|
92
|
-
this.
|
|
92
|
+
this.adapter.notifySelect({
|
|
93
93
|
currentMonth,
|
|
94
94
|
currentYear: year
|
|
95
95
|
});
|
|
96
96
|
if (type !== "year") this.#autoSelectMonth(item, panelType, year, currentMonth);
|
|
97
|
-
}
|
|
98
|
-
selectMonth(item, panelType) {
|
|
97
|
+
};
|
|
98
|
+
selectMonth = (item, panelType) => {
|
|
99
99
|
const { currentMonth, currentYear } = YearAndMonthFoundation.getYearAndMonth(this.getProps());
|
|
100
100
|
const { type } = this.getProps();
|
|
101
101
|
const left = strings.PANEL_TYPE_LEFT;
|
|
@@ -103,13 +103,13 @@ var YearAndMonthFoundation = class YearAndMonthFoundation extends BaseFoundation
|
|
|
103
103
|
const month = { ...currentMonth };
|
|
104
104
|
month[panelType] = item.month;
|
|
105
105
|
if (type === "monthRange" && panelType === left && currentYear[left] === currentYear[right] && item.month > month[right]) month[right] = item.month;
|
|
106
|
-
this.
|
|
106
|
+
this.adapter.notifySelect({
|
|
107
107
|
currentYear,
|
|
108
108
|
currentMonth: month
|
|
109
109
|
});
|
|
110
|
-
}
|
|
111
|
-
backToMain() {
|
|
112
|
-
this.
|
|
113
|
-
}
|
|
110
|
+
};
|
|
111
|
+
backToMain = () => {
|
|
112
|
+
this.adapter.notifyBackToMain();
|
|
113
|
+
};
|
|
114
114
|
};
|
|
115
115
|
export { YearAndMonthFoundation as default };
|
|
@@ -25,7 +25,7 @@ export default class DragMoveFoundation<P extends DragMoveBaseProps = DragMoveBa
|
|
|
25
25
|
* Prepares host children as they appear: the position strategy, a move cursor on the handler, and
|
|
26
26
|
* `touch-action: none` so a touch drag is not taken over by scrolling.
|
|
27
27
|
*/
|
|
28
|
-
prepareElements(elements: Element[])
|
|
29
|
-
updatePositionStrategy()
|
|
28
|
+
prepareElements: (elements: Element[]) => void;
|
|
29
|
+
updatePositionStrategy: () => void;
|
|
30
30
|
destroy(): void;
|
|
31
31
|
}
|
|
@@ -58,7 +58,7 @@ var DragMoveFoundation = class extends BaseFoundation {
|
|
|
58
58
|
#allowMove(e) {
|
|
59
59
|
const { allowMove, allowInputDrag } = this.getProps();
|
|
60
60
|
if (!allowInputDrag) {
|
|
61
|
-
const target = e.target.tagName.toLowerCase();
|
|
61
|
+
const target = e.target instanceof Element ? e.target.tagName.toLowerCase() : "";
|
|
62
62
|
if (target === "input" || target === "textarea") return false;
|
|
63
63
|
}
|
|
64
64
|
if (allowMove) return allowMove(e, this.#element);
|
|
@@ -100,16 +100,16 @@ var DragMoveFoundation = class extends BaseFoundation {
|
|
|
100
100
|
}
|
|
101
101
|
#onPointerMove = (e) => {
|
|
102
102
|
if (e.pointerId !== this.#pointerId) return;
|
|
103
|
-
if (this.#isTouch(e)) this.
|
|
104
|
-
else this.
|
|
103
|
+
if (this.#isTouch(e)) this.adapter.notifyTouchMove(e);
|
|
104
|
+
else this.adapter.notifyMouseMove(e);
|
|
105
105
|
this.#changePos(e);
|
|
106
106
|
};
|
|
107
107
|
#onPointerEnd = (e) => {
|
|
108
108
|
if (e.pointerId !== this.#pointerId) return;
|
|
109
109
|
this.#stopDrag();
|
|
110
|
-
if (e.type === "pointercancel") this.
|
|
111
|
-
else if (this.#isTouch(e)) this.
|
|
112
|
-
else this.
|
|
110
|
+
if (e.type === "pointercancel") this.adapter.notifyTouchCancel(e);
|
|
111
|
+
else if (this.#isTouch(e)) this.adapter.notifyTouchEnd(e);
|
|
112
|
+
else this.adapter.notifyMouseUp(e);
|
|
113
113
|
};
|
|
114
114
|
#stopDrag() {
|
|
115
115
|
this.#dragController?.abort();
|
|
@@ -131,11 +131,13 @@ var DragMoveFoundation = class extends BaseFoundation {
|
|
|
131
131
|
if (this.#dragController) return;
|
|
132
132
|
if (isSecondaryPress(e)) return;
|
|
133
133
|
const element = e.currentTarget;
|
|
134
|
-
if (!
|
|
134
|
+
if (!(element instanceof HTMLElement)) return;
|
|
135
|
+
const handler = this.#getHandler(element);
|
|
136
|
+
if (!(e.target instanceof Node && handler.contains(e.target))) return;
|
|
135
137
|
this.#element = element;
|
|
136
138
|
this.#calcMoveRange();
|
|
137
|
-
if (this.#isTouch(e)) this.
|
|
138
|
-
else this.
|
|
139
|
+
if (this.#isTouch(e)) this.adapter.notifyTouchStart(e);
|
|
140
|
+
else this.adapter.notifyMouseDown(e);
|
|
139
141
|
if (!this.#allowMove(e)) return;
|
|
140
142
|
this.#pointerId = e.pointerId;
|
|
141
143
|
const controller = new AbortController();
|
|
@@ -151,7 +153,7 @@ var DragMoveFoundation = class extends BaseFoundation {
|
|
|
151
153
|
* Prepares host children as they appear: the position strategy, a move cursor on the handler, and
|
|
152
154
|
* `touch-action: none` so a touch drag is not taken over by scrolling.
|
|
153
155
|
*/
|
|
154
|
-
prepareElements(elements) {
|
|
156
|
+
prepareElements = (elements) => {
|
|
155
157
|
for (const element of this.#elements) if (!element.isConnected) this.#elements.delete(element);
|
|
156
158
|
for (const element of elements) {
|
|
157
159
|
if (this.#elements.has(element)) continue;
|
|
@@ -164,10 +166,10 @@ var DragMoveFoundation = class extends BaseFoundation {
|
|
|
164
166
|
});
|
|
165
167
|
}
|
|
166
168
|
this.#prepareHandlers();
|
|
167
|
-
}
|
|
168
|
-
updatePositionStrategy() {
|
|
169
|
+
};
|
|
170
|
+
updatePositionStrategy = () => {
|
|
169
171
|
for (const element of this.#elements) this.#applyPositionStrategy(element);
|
|
170
|
-
}
|
|
172
|
+
};
|
|
171
173
|
destroy() {
|
|
172
174
|
this.#stopDrag();
|
|
173
175
|
this.#handlerObserver?.disconnect();
|
|
@@ -9,6 +9,8 @@ export interface DropdownAdapter<P extends DropdownBaseProps = DropdownBaseProps
|
|
|
9
9
|
/** Hides the popup through Tooltip's hide(), without moving focus: a controlled one only reports the request */
|
|
10
10
|
hidePopup(): void;
|
|
11
11
|
}
|
|
12
|
+
/** The members of a keyboard event the foundation reads; DOM events and React synthetic events both satisfy it */
|
|
13
|
+
type DropdownKeyEvent = Pick<KeyboardEvent, 'defaultPrevented' | 'key' | 'preventDefault' | 'stopPropagation' | 'target'>;
|
|
12
14
|
/** The props the foundation reads */
|
|
13
15
|
export interface DropdownBaseProps {
|
|
14
16
|
trigger?: string;
|
|
@@ -22,16 +24,17 @@ export default class DropdownFoundation<P extends DropdownBaseProps = DropdownBa
|
|
|
22
24
|
#private;
|
|
23
25
|
destroy(): void;
|
|
24
26
|
/** Closes the menu without moving focus */
|
|
25
|
-
close()
|
|
27
|
+
close: () => void;
|
|
26
28
|
/** Tooltip's onVisibleChange: an actual change when uncontrolled, only a request to the owner when controlled */
|
|
27
|
-
handleVisibleChange(visible: boolean)
|
|
29
|
+
handleVisibleChange: (visible: boolean) => void;
|
|
28
30
|
/**
|
|
29
31
|
* Tooltip's initial focus of each opening, right after the popup is shown, controlled or not. Not deferred to
|
|
30
32
|
* afterOpen: a keyboard user would wait out the enter animation.
|
|
31
33
|
*/
|
|
32
|
-
handleOpened()
|
|
34
|
+
handleOpened: () => void;
|
|
33
35
|
/**
|
|
34
36
|
* @param isMenuButton whether the trigger is a menu button: only then Up and Down open a closed menu
|
|
35
37
|
*/
|
|
36
|
-
handleKeyDown(event:
|
|
37
|
-
}
|
|
38
|
+
handleKeyDown: (event: DropdownKeyEvent, isMenuButton?: boolean) => void;
|
|
39
|
+
}
|
|
40
|
+
export {};
|