@fibrae/semi-foundation 0.1.1 → 0.3.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 -4
- package/dist/anchor/foundation.js +21 -22
- package/dist/audio-player/foundation.d.ts +10 -13
- package/dist/audio-player/foundation.js +19 -20
- package/dist/auto-complete/foundation.d.ts +12 -14
- package/dist/auto-complete/foundation.js +51 -52
- package/dist/avatar/foundation.d.ts +5 -6
- package/dist/avatar/foundation.js +16 -16
- package/dist/avatar/variables.scss +0 -1
- package/dist/backtop/foundation.d.ts +2 -5
- package/dist/backtop/foundation.js +7 -8
- package/dist/banner/foundation.d.ts +1 -1
- package/dist/banner/foundation.js +4 -4
- package/dist/base/auto-close-foundation.d.ts +8 -9
- package/dist/base/auto-close-foundation.js +15 -15
- package/dist/base/foundation.d.ts +4 -4
- package/dist/base/foundation.js +12 -11
- package/dist/base/list-store.d.ts +0 -1
- 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.d.ts +0 -10
- package/dist/calendar/event-util.js +1 -11
- package/dist/calendar/foundation.d.ts +1 -6
- package/dist/calendar/foundation.js +5 -9
- package/dist/calendar/month-foundation.d.ts +2 -3
- package/dist/calendar/month-foundation.js +6 -7
- package/dist/carousel/foundation.d.ts +17 -19
- package/dist/carousel/foundation.js +51 -51
- package/dist/cascader/foundation.d.ts +36 -32
- package/dist/cascader/foundation.js +145 -132
- package/dist/cascader/util.d.ts +1 -8
- package/dist/cascader/util.js +1 -8
- package/dist/checkbox/checkbox-foundation.d.ts +3 -7
- package/dist/checkbox/checkbox-foundation.js +15 -17
- package/dist/checkbox/checkbox-group-foundation.d.ts +2 -3
- package/dist/checkbox/checkbox-group-foundation.js +8 -8
- package/dist/code-highlight/index.d.ts +1 -2
- 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-picker.scss +0 -2
- 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/color-picker/interface.d.ts +0 -1
- package/dist/config-provider/breakpoint-observer.d.ts +3 -3
- package/dist/config-provider/breakpoint-observer.js +6 -6
- package/dist/config-provider/responsive-types.d.ts +0 -16
- package/dist/cropper/foundation.d.ts +15 -16
- package/dist/cropper/foundation.js +26 -24
- package/dist/date-picker/_utils/get-default-picker-date.d.ts +0 -3
- package/dist/date-picker/_utils/get-default-picker-date.js +0 -3
- package/dist/date-picker/_utils/get-inset-input-format-token.d.ts +0 -2
- package/dist/date-picker/_utils/get-inset-input-format-token.js +0 -2
- package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.d.ts +0 -2
- package/dist/date-picker/_utils/get-inset-input-value-from-inset-input-str.js +0 -2
- package/dist/date-picker/_utils/parser.d.ts +0 -3
- package/dist/date-picker/_utils/parser.js +0 -7
- package/dist/date-picker/_utils/picker-type.d.ts +1 -3
- package/dist/date-picker/_utils/picker-type.js +0 -2
- package/dist/date-picker/_utils/to-callback-args.d.ts +0 -1
- package/dist/date-picker/_utils/to-callback-args.js +0 -1
- package/dist/date-picker/date-picker.scss +0 -3
- package/dist/date-picker/foundation.d.ts +39 -58
- package/dist/date-picker/foundation.js +126 -153
- package/dist/date-picker/input-foundation.d.ts +10 -16
- package/dist/date-picker/input-foundation.js +28 -30
- package/dist/date-picker/month-foundation.d.ts +0 -3
- package/dist/date-picker/month-foundation.js +0 -2
- package/dist/date-picker/months-grid-foundation.d.ts +17 -26
- package/dist/date-picker/months-grid-foundation.js +65 -75
- 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 -3
- package/dist/drag-move/foundation.js +15 -13
- package/dist/dropdown/foundation.d.ts +8 -7
- package/dist/dropdown/foundation.js +32 -28
- package/dist/dropdown/menu-foundation.d.ts +1 -2
- package/dist/dropdown/menu-foundation.js +11 -11
- package/dist/feedback/foundation.d.ts +9 -10
- package/dist/feedback/foundation.js +33 -33
- package/dist/feedback/variables.scss +1 -5
- package/dist/float-button/float-button.css +0 -1
- package/dist/float-button/float-button.scss +0 -2
- package/dist/form/form-api-proxy.d.ts +8 -7
- package/dist/form/form-api-proxy.js +25 -25
- package/dist/form/form.scss +0 -12
- package/dist/form/foundation.d.ts +5 -5
- package/dist/form/foundation.js +60 -76
- package/dist/form/interface.d.ts +2 -15
- package/dist/form/utils.d.ts +0 -8
- package/dist/form/utils.js +0 -7
- package/dist/form/variables.scss +1 -4
- package/dist/grid/variables.scss +0 -10
- package/dist/highlight/foundation.d.ts +0 -2
- package/dist/highlight/foundation.js +1 -3
- package/dist/hot-keys/foundation.d.ts +2 -3
- package/dist/hot-keys/foundation.js +5 -5
- package/dist/image/image-foundation.d.ts +4 -6
- package/dist/image/image-foundation.js +10 -10
- package/dist/image/preview-footer-foundation.d.ts +3 -4
- package/dist/image/preview-footer-foundation.js +10 -10
- package/dist/image/preview-foundation.d.ts +0 -3
- package/dist/image/preview-foundation.js +7 -6
- package/dist/image/preview-image-foundation.d.ts +6 -9
- package/dist/image/preview-image-foundation.js +14 -14
- package/dist/image/preview-inner-foundation.d.ts +9 -10
- package/dist/image/preview-inner-foundation.js +38 -38
- package/dist/input/foundation.d.ts +10 -11
- package/dist/input/foundation.js +47 -49
- package/dist/input/text-entry-foundation.d.ts +3 -5
- package/dist/input/text-entry-foundation.js +14 -15
- package/dist/input/textarea-foundation.d.ts +7 -8
- package/dist/input/textarea-foundation.js +36 -36
- package/dist/input-number/caret.d.ts +0 -1
- package/dist/input-number/caret.js +0 -1
- package/dist/input-number/foundation.d.ts +16 -19
- package/dist/input-number/foundation.js +54 -58
- package/dist/json-viewer/foundation.d.ts +8 -10
- package/dist/json-viewer/foundation.js +23 -24
- package/dist/locale/interface.d.ts +0 -3
- package/dist/lottie/foundation.d.ts +1 -1
- package/dist/lottie/foundation.js +4 -4
- package/dist/markdown-render/foundation.d.ts +2 -7
- package/dist/markdown-render/foundation.js +5 -9
- 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 -8
- package/dist/navigation/foundation.js +14 -20
- 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 -4
- package/dist/navigation/sub-nav-foundation.js +17 -17
- package/dist/notification/notification-list-foundation.d.ts +7 -8
- package/dist/notification/notification-list-foundation.js +12 -13
- package/dist/notification/variables.scss +0 -1
- package/dist/overflow-list/foundation.d.ts +4 -6
- package/dist/overflow-list/foundation.js +18 -19
- package/dist/pagination/foundation.d.ts +8 -10
- package/dist/pagination/foundation.js +28 -28
- package/dist/pincode/foundation.d.ts +6 -9
- package/dist/pincode/foundation.js +23 -26
- package/dist/popconfirm/popconfirm-foundation.d.ts +7 -9
- package/dist/popconfirm/popconfirm-foundation.js +26 -26
- package/dist/progress/generates.d.ts +1 -4
- package/dist/progress/generates.js +1 -4
- package/dist/progress/utils.d.ts +1 -1
- package/dist/progress/utils.js +1 -1
- package/dist/radio/radio-foundation.d.ts +5 -9
- package/dist/radio/radio-foundation.js +15 -16
- package/dist/radio/radio-group-foundation.d.ts +2 -3
- package/dist/radio/radio-group-foundation.js +9 -9
- package/dist/rating/foundation.d.ts +10 -15
- package/dist/rating/foundation.js +35 -38
- package/dist/resizable/group/index.d.ts +6 -10
- package/dist/resizable/group/index.js +40 -44
- package/dist/resizable/resizable.scss +0 -1
- package/dist/resizable/single/index.d.ts +3 -7
- package/dist/resizable/single/index.js +10 -13
- package/dist/scroll-list/item-foundation.d.ts +7 -9
- package/dist/scroll-list/item-foundation.js +35 -36
- package/dist/scroll-list/variables.scss +1 -6
- package/dist/select/foundation.d.ts +42 -57
- package/dist/select/foundation.js +214 -279
- package/dist/select/option-foundation.d.ts +23 -28
- package/dist/select/option-foundation.js +10 -19
- package/dist/select/variables.scss +1 -8
- package/dist/side-sheet/side-sheet-foundation.d.ts +7 -12
- package/dist/side-sheet/side-sheet-foundation.js +23 -27
- package/dist/side-sheet/variables.scss +1 -3
- package/dist/slider/foundation.d.ts +17 -28
- package/dist/slider/foundation.js +47 -59
- package/dist/slider/variables.scss +1 -5
- package/dist/sortable/accessibility.d.ts +1 -1
- package/dist/sortable/accessibility.js +2 -2
- package/dist/spin/foundation.d.ts +2 -4
- package/dist/spin/foundation.js +6 -7
- package/dist/spin/variables.scss +1 -3
- package/dist/steps/utils.d.ts +1 -1
- package/dist/switch/foundation.d.ts +2 -3
- package/dist/switch/foundation.js +7 -7
- package/dist/switch/switch.scss +1 -1
- package/dist/switch/variables.scss +1 -5
- package/dist/table/foundation.d.ts +24 -33
- package/dist/table/foundation.js +144 -108
- package/dist/table/table.scss +0 -1
- package/dist/table/utils.d.ts +2 -10
- package/dist/table/utils.js +0 -13
- package/dist/table/variables.scss +1 -5
- package/dist/tabs/foundation.d.ts +5 -14
- package/dist/tabs/foundation.js +17 -21
- package/dist/tabs/tabs.scss +1 -1
- package/dist/tag/focus.js +0 -1
- package/dist/tag-input/foundation.d.ts +11 -13
- package/dist/tag-input/foundation.js +52 -53
- package/dist/tag-input/tag-input.scss +0 -1
- package/dist/tag-input/utils/tag-focus.d.ts +0 -1
- package/dist/tag-input/utils/tag-focus.js +0 -1
- package/dist/time-picker/combox-foundation.d.ts +3 -11
- package/dist/time-picker/combox-foundation.js +3 -10
- package/dist/time-picker/foundation.d.ts +13 -23
- package/dist/time-picker/foundation.js +39 -48
- package/dist/time-picker/input-foundation.d.ts +4 -4
- package/dist/time-picker/input-foundation.js +13 -13
- package/dist/time-picker/utils/index.d.ts +0 -11
- package/dist/time-picker/utils/index.js +0 -11
- package/dist/toast/toast-list-foundation.d.ts +7 -7
- package/dist/toast/toast-list-foundation.js +14 -14
- package/dist/tooltip/adjust-position.d.ts +1 -2
- package/dist/tooltip/constants.d.ts +0 -3
- package/dist/tooltip/constants.js +0 -3
- package/dist/tooltip/foundation.d.ts +9 -12
- package/dist/tooltip/foundation.js +67 -63
- package/dist/tooltip/position.scss +0 -1
- package/dist/transfer/foundation.d.ts +22 -13
- package/dist/transfer/foundation.js +38 -24
- package/dist/tree/foundation.d.ts +14 -16
- package/dist/tree/foundation.js +61 -62
- package/dist/tree/shared.d.ts +2 -4
- package/dist/tree/shared.js +0 -2
- package/dist/tree/tree-util.d.ts +0 -5
- package/dist/tree/tree-util.js +0 -5
- package/dist/tree-select/foundation.d.ts +26 -22
- package/dist/tree-select/foundation.js +91 -86
- package/dist/typography/ellipsis.d.ts +5 -7
- package/dist/typography/ellipsis.js +8 -10
- package/dist/typography/format-numeral.d.ts +1 -1
- package/dist/typography/format-numeral.js +2 -2
- package/dist/typography/typography.scss +0 -1
- package/dist/upload/constants.d.ts +1 -1
- package/dist/upload/foundation.d.ts +17 -23
- package/dist/upload/foundation.js +93 -103
- package/dist/upload/utils.d.ts +3 -8
- package/dist/upload/utils.js +6 -11
- package/dist/user-guide/foundation.d.ts +3 -5
- package/dist/user-guide/foundation.js +19 -19
- package/dist/utils/a11y.d.ts +2 -6
- package/dist/utils/a11y.js +1 -4
- package/dist/utils/announcer.d.ts +2 -2
- package/dist/utils/announcer.js +4 -4
- package/dist/utils/array.d.ts +0 -6
- package/dist/utils/array.js +0 -6
- package/dist/utils/date-fns-extra.js +1 -5
- package/dist/utils/dom.d.ts +0 -1
- package/dist/utils/dom.js +0 -1
- package/dist/utils/escape-html.js +0 -3
- package/dist/utils/field-sizing.d.ts +0 -2
- package/dist/utils/field-sizing.js +0 -2
- package/dist/utils/focus-handle.d.ts +1 -2
- package/dist/utils/focus-handle.js +1 -3
- package/dist/utils/focus-scope.d.ts +5 -6
- package/dist/utils/focus-scope.js +10 -11
- 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/utils/scroll-lock.d.ts +3 -4
- package/dist/utils/scroll-lock.js +3 -4
- package/dist/utils/tween.d.ts +0 -1
- package/dist/utils/tween.js +0 -1
- package/dist/utils/uuid.d.ts +0 -1
- package/dist/utils/uuid.js +0 -1
- package/dist/utils/warning.d.ts +0 -1
- package/dist/utils/warning.js +0 -1
- 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 -3
- package/dist/video-player/progress-foundation.js +12 -13
- package/dist/video-player/variables.scss +1 -1
- package/package.json +2 -2
|
@@ -25,9 +25,6 @@ export type DayStatusType = {
|
|
|
25
25
|
export type DisabledDateOptions = {
|
|
26
26
|
rangeStart?: string;
|
|
27
27
|
rangeEnd?: string;
|
|
28
|
-
/**
|
|
29
|
-
* current select of range type
|
|
30
|
-
*/
|
|
31
28
|
rangeInputFocus?: 'rangeStart' | 'rangeEnd' | false;
|
|
32
29
|
};
|
|
33
30
|
/** `null` start and end make a preset that clears the value */
|
|
@@ -135,10 +132,7 @@ export interface DatePickerFoundationProps extends ElementProps, RenderProps, Ev
|
|
|
135
132
|
/** filled by the framework from the LocaleProvider, not a component prop */
|
|
136
133
|
dateFnsLocale?: any;
|
|
137
134
|
rangeSeparator?: string;
|
|
138
|
-
/**
|
|
139
|
-
* Only for UI render. Keep `semi-foundation` framework-agnostic (no React types).
|
|
140
|
-
* `semi-ui-react` layer should declare this as `React.ReactNode`.
|
|
141
|
-
*/
|
|
135
|
+
/** `any` keeps the foundation framework-agnostic; each framework package declares its own node type */
|
|
142
136
|
rangeSeparatorNode?: any;
|
|
143
137
|
insetInput?: DateInputFoundationProps['insetInput'];
|
|
144
138
|
preventScroll?: boolean;
|
|
@@ -146,15 +140,14 @@ export interface DatePickerFoundationProps extends ElementProps, RenderProps, Ev
|
|
|
146
140
|
export interface DatePickerFoundationState {
|
|
147
141
|
panelShow: boolean;
|
|
148
142
|
isRange: boolean;
|
|
149
|
-
/**
|
|
143
|
+
/** `null` while the input shows the formatted value */
|
|
150
144
|
inputValue: string | null;
|
|
151
145
|
value: Date[];
|
|
152
146
|
cachedSelectedValue: (Date | null)[];
|
|
153
147
|
prevTimeZone: string | number | null;
|
|
154
148
|
/** `undefined` until a range input is focused or the value is set */
|
|
155
|
-
rangeInputFocus
|
|
149
|
+
rangeInputFocus?: RangeInput | false;
|
|
156
150
|
autofocus: boolean;
|
|
157
|
-
/** value of inset input */
|
|
158
151
|
insetInputValue: InsetInputValue | null;
|
|
159
152
|
triggerDisabled: boolean | null;
|
|
160
153
|
/** which range inputs have been focused since the panel opened; a range closes once both have */
|
|
@@ -179,7 +172,7 @@ export interface DatePickerAdapter extends DefaultAdapter<DatePickerFoundationPr
|
|
|
179
172
|
setRangeInputFocus: (rangeInputFocus: DatePickerFoundationState['rangeInputFocus']) => void;
|
|
180
173
|
/** focus is in the panel and came from the keyboard (`:focus-visible`), not from a click */
|
|
181
174
|
isKeyboardFocusInPanel: () => boolean;
|
|
182
|
-
isEventTarget: (e:
|
|
175
|
+
isEventTarget: (e: Pick<Event, 'target' | 'currentTarget'>) => boolean;
|
|
183
176
|
updateInsetInputValue: (insetInputValue: InsetInputValue) => void;
|
|
184
177
|
setInsetInputFocus: () => void;
|
|
185
178
|
/** `callback` runs once the trigger renders with the new disabled state */
|
|
@@ -189,10 +182,6 @@ export interface DatePickerAdapter extends DefaultAdapter<DatePickerFoundationPr
|
|
|
189
182
|
setTriggerFocus: () => void;
|
|
190
183
|
blurFocusedElement: () => void;
|
|
191
184
|
}
|
|
192
|
-
/**
|
|
193
|
-
* Keeps the date value and the input text in sync: a selected date updates the input text, and a valid input text
|
|
194
|
-
* updates the date value; both notify the change.
|
|
195
|
-
*/
|
|
196
185
|
export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapter, DatePickerFoundationProps, DatePickerFoundationState> {
|
|
197
186
|
#private;
|
|
198
187
|
/**
|
|
@@ -230,10 +219,7 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
|
|
|
230
219
|
static disposeDateFn<R>(timeZone: string | number | undefined, fn: (date: any, ...rest: any) => R, date: Date | Date[], ...rest: any[]): R;
|
|
231
220
|
/** A controlled `open` is not copied into state; a disabled picker shows no panel */
|
|
232
221
|
static isPanelShown(props: Pick<DatePickerFoundationProps, 'open' | 'disabled'>, state: Pick<DatePickerFoundationState, 'panelShow'>): boolean;
|
|
233
|
-
/**
|
|
234
|
-
* The props derived from others. The rtl default of `position` stays with the
|
|
235
|
-
* frameworks, which read the direction from their config.
|
|
236
|
-
*/
|
|
222
|
+
/** The rtl default of `position` stays with the frameworks, which read the direction from their config. */
|
|
237
223
|
static normalizeProps<P extends string = Position>({ type, format, rangeSeparator, insetInput, position, spacing }: Pick<DatePickerFoundationProps, 'type' | 'format' | 'rangeSeparator' | 'insetInput' | 'spacing'> & {
|
|
238
224
|
position?: P;
|
|
239
225
|
}): {
|
|
@@ -248,56 +234,52 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
|
|
|
248
234
|
* than `getProp` and `getProps`.
|
|
249
235
|
*
|
|
250
236
|
* @param props the props with the defaults applied and `timeZone` resolved from the ConfigProvider
|
|
251
|
-
* @returns `value`, `cachedSelectedValue`, `rangeInputFocus`, `inputValue` and `prevTimeZone`
|
|
252
237
|
*/
|
|
253
238
|
static getInitialState(props: DatePickerFoundationProps): Pick<DatePickerFoundationState, 'value' | 'cachedSelectedValue' | 'rangeInputFocus' | 'inputValue' | 'prevTimeZone'>;
|
|
254
239
|
init(): void;
|
|
255
|
-
initFromProps({ value, timeZone, prevTimeZone }: Pick<DatePickerFoundationProps,
|
|
240
|
+
initFromProps: ({ value, timeZone, prevTimeZone }: Pick<DatePickerFoundationProps, "value" | "timeZone"> & {
|
|
256
241
|
prevTimeZone?: string | number;
|
|
257
|
-
})
|
|
242
|
+
}) => void;
|
|
258
243
|
/** Called for a mousedown outside the trigger and the panel while the panel is shown */
|
|
259
|
-
handleClickOutside(e: MouseEvent)
|
|
244
|
+
handleClickOutside: (e: MouseEvent) => void;
|
|
260
245
|
/** @param e the mousedown outside that closes the panel, passed on to onBlur */
|
|
261
246
|
closePanel(e?: MouseEvent): void;
|
|
262
|
-
open()
|
|
247
|
+
open: () => void;
|
|
263
248
|
/** The controlled `open` turned true: starts what an uncontrolled open would */
|
|
264
|
-
handleControlledOpen()
|
|
265
|
-
handleEscKeyDown()
|
|
266
|
-
close(e?: MouseEvent)
|
|
249
|
+
handleControlledOpen: () => void;
|
|
250
|
+
handleEscKeyDown: () => void;
|
|
251
|
+
close: (e?: MouseEvent) => void;
|
|
267
252
|
/** Closes the panel without a blur or a returned focus, as when a Vue KeepAlive deactivates the host */
|
|
268
|
-
deactivate()
|
|
253
|
+
deactivate: () => void;
|
|
269
254
|
destroy(): void;
|
|
270
|
-
focus(focusType?: RangeInput)
|
|
271
|
-
blur()
|
|
255
|
+
focus: (focusType?: RangeInput) => void;
|
|
256
|
+
blur: () => void;
|
|
272
257
|
/** The controlled `open` turned false: clears what an uncontrolled close would */
|
|
273
|
-
handleControlledClose()
|
|
258
|
+
handleControlledClose: () => void;
|
|
274
259
|
/** Whether the range input other than `currentRangeInput` has been focused since the panel opened */
|
|
275
|
-
hasOtherRangeInputBeenFocused(currentRangeInput: RangeInput)
|
|
276
|
-
handleInputChange(input: string, e:
|
|
277
|
-
|
|
278
|
-
* Always updates insetInputValue; inputValue and value are updated only when the text parses to a valid date.
|
|
279
|
-
*/
|
|
280
|
-
handleInsetInputChange({ insetInputStr, format, insetInputValue }: {
|
|
260
|
+
hasOtherRangeInputBeenFocused: (currentRangeInput: RangeInput) => boolean;
|
|
261
|
+
handleInputChange: (input: string, e: unknown) => void;
|
|
262
|
+
handleInsetInputChange: ({ insetInputStr, format, insetInputValue }: {
|
|
281
263
|
insetInputStr: string;
|
|
282
264
|
format: string;
|
|
283
265
|
insetInputValue: InsetInputValue;
|
|
284
|
-
})
|
|
285
|
-
handleRangeEndTabPress()
|
|
286
|
-
handleInputFocus(e: unknown, range: RangeInput)
|
|
287
|
-
handleSetRangeFocus(rangeInputFocus: RangeInput | false)
|
|
288
|
-
handleInputClear(e:
|
|
289
|
-
handleRangeInputClear(e:
|
|
290
|
-
handleInputComplete(input?: string)
|
|
266
|
+
}) => void;
|
|
267
|
+
handleRangeEndTabPress: () => void;
|
|
268
|
+
handleInputFocus: (e: unknown, range: RangeInput) => void;
|
|
269
|
+
handleSetRangeFocus: (rangeInputFocus: RangeInput | false) => void;
|
|
270
|
+
handleInputClear: (e: unknown) => void;
|
|
271
|
+
handleRangeInputClear: (e: unknown) => void;
|
|
272
|
+
handleInputComplete: (input?: string) => void;
|
|
291
273
|
/**
|
|
292
274
|
* @param options `rangeInputFocus` is the range input the dates were picked for, when the panel has moved
|
|
293
275
|
* the focus on before telling about the change
|
|
294
276
|
*/
|
|
295
|
-
handleSelectedChange(value: Date[], options?: {
|
|
277
|
+
handleSelectedChange: (value: Date[], options?: {
|
|
296
278
|
needCheckFocusRecord?: boolean;
|
|
297
279
|
closePanel?: boolean;
|
|
298
280
|
rangeInputFocus?: RangeInput | false;
|
|
299
|
-
})
|
|
300
|
-
handleYMSelectedChange({ currentMonth, currentYear }?: {
|
|
281
|
+
}) => void;
|
|
282
|
+
handleYMSelectedChange: ({ currentMonth, currentYear }?: {
|
|
301
283
|
currentMonth?: {
|
|
302
284
|
left: number;
|
|
303
285
|
right: number;
|
|
@@ -306,18 +288,17 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
|
|
|
306
288
|
left: number;
|
|
307
289
|
right: number;
|
|
308
290
|
};
|
|
309
|
-
})
|
|
310
|
-
handleConfirm()
|
|
311
|
-
handleCancel()
|
|
312
|
-
handlePresetClick(item: PresetType, e: unknown)
|
|
313
|
-
disabledDisposeDate(date: Date, ...rest: any[])
|
|
314
|
-
disabledDisposeTime(date: Date | Date[], ...rest: any[])
|
|
291
|
+
}) => void;
|
|
292
|
+
handleConfirm: () => void;
|
|
293
|
+
handleCancel: () => void;
|
|
294
|
+
handlePresetClick: (item: PresetType, e: unknown) => void;
|
|
295
|
+
disabledDisposeDate: (date: Date, ...rest: any[]) => boolean;
|
|
296
|
+
disabledDisposeTime: (date: Date | Date[], ...rest: any[]) => ReturnType<DisabledTimeType>;
|
|
315
297
|
/**
|
|
316
|
-
* Opens the panel on trigger click and, for range types, focuses rangeStart when no range input is focused.
|
|
317
298
|
* Non-range triggers are native inputs that already handle focus. isEventTarget tells a click on the input
|
|
318
299
|
* wrapper itself from one bubbled up from a child, which already handled focus.
|
|
319
300
|
*/
|
|
320
|
-
handleTriggerWrapperClick(e:
|
|
301
|
+
handleTriggerWrapperClick(e: Pick<Event, 'target' | 'currentTarget'>): void;
|
|
321
302
|
/**
|
|
322
303
|
* The trigger's click handler. Enter and Space on an inner control of the default trigger (its clear button) click
|
|
323
304
|
* it, and that click must not open the panel too; a pointer click on it still does. A custom trigger skips the
|
|
@@ -325,12 +306,12 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
|
|
|
325
306
|
* control that must not open it stops propagation itself). Keys reach handleTriggerWrapperClick through
|
|
326
307
|
* handleTriggerKeyDown instead, so the check stays out of it.
|
|
327
308
|
*/
|
|
328
|
-
handleTriggerClick(e: Pick<MouseEvent,
|
|
309
|
+
handleTriggerClick: (e: Pick<MouseEvent, "detail" | "target" | "currentTarget">, isCustomTrigger: boolean) => void;
|
|
329
310
|
/**
|
|
330
311
|
* APG combobox: Down Arrow on the closed trigger opens the panel (once it is open, the Popover moves focus into
|
|
331
312
|
* it). A custom trigger that is itself the Tab stop is a button, so Enter and Space open it too.
|
|
332
313
|
*/
|
|
333
|
-
handleTriggerKeyDown(e: Pick<KeyboardEvent,
|
|
334
|
-
handlePanelVisibleChange(visible: boolean)
|
|
314
|
+
handleTriggerKeyDown: (e: Pick<KeyboardEvent, "key" | "preventDefault" | "target" | "currentTarget">, isTriggerButton: boolean) => void;
|
|
315
|
+
handlePanelVisibleChange: (visible: boolean) => void;
|
|
335
316
|
}
|
|
336
317
|
export type { DateInputFoundationProps, RangeInput, Type };
|