@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.
Files changed (194) hide show
  1. package/dist/anchor/foundation.d.ts +1 -1
  2. package/dist/anchor/foundation.js +21 -21
  3. package/dist/audio-player/foundation.d.ts +10 -10
  4. package/dist/audio-player/foundation.js +19 -19
  5. package/dist/auto-complete/foundation.d.ts +12 -12
  6. package/dist/auto-complete/foundation.js +51 -51
  7. package/dist/avatar/foundation.d.ts +5 -5
  8. package/dist/avatar/foundation.js +16 -16
  9. package/dist/backtop/foundation.d.ts +2 -2
  10. package/dist/backtop/foundation.js +7 -7
  11. package/dist/banner/foundation.d.ts +1 -1
  12. package/dist/banner/foundation.js +4 -4
  13. package/dist/base/auto-close-foundation.d.ts +8 -8
  14. package/dist/base/auto-close-foundation.js +15 -15
  15. package/dist/base/foundation.d.ts +4 -3
  16. package/dist/base/foundation.js +12 -11
  17. package/dist/breadcrumb/foundation.d.ts +5 -5
  18. package/dist/breadcrumb/foundation.js +9 -10
  19. package/dist/breadcrumb/item-foundation.d.ts +3 -3
  20. package/dist/breadcrumb/item-foundation.js +6 -6
  21. package/dist/calendar/event-util.js +1 -1
  22. package/dist/calendar/foundation.js +4 -4
  23. package/dist/calendar/month-foundation.d.ts +2 -2
  24. package/dist/calendar/month-foundation.js +6 -6
  25. package/dist/carousel/foundation.d.ts +17 -17
  26. package/dist/carousel/foundation.js +51 -51
  27. package/dist/cascader/foundation.d.ts +34 -26
  28. package/dist/cascader/foundation.js +143 -121
  29. package/dist/checkbox/checkbox-foundation.d.ts +2 -2
  30. package/dist/checkbox/checkbox-foundation.js +15 -15
  31. package/dist/checkbox/checkbox-group-foundation.d.ts +2 -2
  32. package/dist/checkbox/checkbox-group-foundation.js +8 -8
  33. package/dist/code-highlight/index.d.ts +1 -1
  34. package/dist/code-highlight/index.js +3 -3
  35. package/dist/collapse/foundation.d.ts +2 -2
  36. package/dist/collapse/foundation.js +7 -7
  37. package/dist/collapsible/foundation.d.ts +3 -3
  38. package/dist/collapsible/foundation.js +8 -8
  39. package/dist/color-picker/alpha-slider-foundation.d.ts +2 -4
  40. package/dist/color-picker/alpha-slider-foundation.js +10 -10
  41. package/dist/color-picker/color-choose-area-foundation.d.ts +2 -5
  42. package/dist/color-picker/color-choose-area-foundation.js +14 -14
  43. package/dist/color-picker/color-slider-foundation.d.ts +2 -4
  44. package/dist/color-picker/color-slider-foundation.js +10 -10
  45. package/dist/color-picker/data-part-foundation.d.ts +5 -5
  46. package/dist/color-picker/data-part-foundation.js +11 -11
  47. package/dist/color-picker/foundation.d.ts +4 -4
  48. package/dist/color-picker/foundation.js +10 -10
  49. package/dist/config-provider/breakpoint-observer.d.ts +3 -3
  50. package/dist/config-provider/breakpoint-observer.js +6 -6
  51. package/dist/cropper/foundation.d.ts +15 -15
  52. package/dist/cropper/foundation.js +26 -23
  53. package/dist/date-picker/_utils/picker-type.d.ts +1 -1
  54. package/dist/date-picker/foundation.d.ts +36 -36
  55. package/dist/date-picker/foundation.js +125 -129
  56. package/dist/date-picker/input-foundation.d.ts +9 -9
  57. package/dist/date-picker/input-foundation.js +28 -28
  58. package/dist/date-picker/months-grid-foundation.d.ts +16 -16
  59. package/dist/date-picker/months-grid-foundation.js +64 -65
  60. package/dist/date-picker/year-and-month-foundation.d.ts +3 -3
  61. package/dist/date-picker/year-and-month-foundation.js +11 -11
  62. package/dist/drag-move/foundation.d.ts +2 -2
  63. package/dist/drag-move/foundation.js +15 -13
  64. package/dist/dropdown/foundation.d.ts +8 -5
  65. package/dist/dropdown/foundation.js +32 -28
  66. package/dist/dropdown/menu-foundation.d.ts +1 -1
  67. package/dist/dropdown/menu-foundation.js +11 -11
  68. package/dist/feedback/foundation.d.ts +9 -9
  69. package/dist/feedback/foundation.js +33 -33
  70. package/dist/form/form-api-proxy.d.ts +8 -7
  71. package/dist/form/form-api-proxy.js +25 -25
  72. package/dist/form/foundation.d.ts +5 -5
  73. package/dist/form/foundation.js +60 -61
  74. package/dist/highlight/foundation.js +1 -1
  75. package/dist/hot-keys/foundation.d.ts +2 -2
  76. package/dist/hot-keys/foundation.js +5 -5
  77. package/dist/image/image-foundation.d.ts +4 -4
  78. package/dist/image/image-foundation.js +10 -10
  79. package/dist/image/preview-footer-foundation.d.ts +3 -3
  80. package/dist/image/preview-footer-foundation.js +10 -10
  81. package/dist/image/preview-foundation.js +7 -6
  82. package/dist/image/preview-image-foundation.d.ts +6 -8
  83. package/dist/image/preview-image-foundation.js +14 -14
  84. package/dist/image/preview-inner-foundation.d.ts +9 -9
  85. package/dist/image/preview-inner-foundation.js +38 -38
  86. package/dist/input/foundation.d.ts +10 -10
  87. package/dist/input/foundation.js +47 -49
  88. package/dist/input/text-entry-foundation.d.ts +3 -3
  89. package/dist/input/text-entry-foundation.js +14 -14
  90. package/dist/input/textarea-foundation.d.ts +7 -7
  91. package/dist/input/textarea-foundation.js +36 -36
  92. package/dist/input-number/foundation.d.ts +16 -14
  93. package/dist/input-number/foundation.js +54 -53
  94. package/dist/json-viewer/foundation.d.ts +8 -8
  95. package/dist/json-viewer/foundation.js +23 -23
  96. package/dist/lottie/foundation.d.ts +1 -1
  97. package/dist/lottie/foundation.js +4 -4
  98. package/dist/markdown-render/foundation.d.ts +1 -1
  99. package/dist/markdown-render/foundation.js +4 -4
  100. package/dist/modal/modal-content-foundation.d.ts +7 -7
  101. package/dist/modal/modal-content-foundation.js +20 -20
  102. package/dist/modal/modal-foundation.d.ts +6 -6
  103. package/dist/modal/modal-foundation.js +24 -24
  104. package/dist/navigation/foundation.d.ts +1 -1
  105. package/dist/navigation/foundation.js +14 -14
  106. package/dist/navigation/item-foundation.d.ts +1 -1
  107. package/dist/navigation/item-foundation.js +8 -8
  108. package/dist/navigation/sub-nav-foundation.d.ts +3 -3
  109. package/dist/navigation/sub-nav-foundation.js +17 -17
  110. package/dist/notification/notification-list-foundation.d.ts +7 -7
  111. package/dist/notification/notification-list-foundation.js +12 -12
  112. package/dist/overflow-list/foundation.d.ts +4 -4
  113. package/dist/overflow-list/foundation.js +18 -18
  114. package/dist/pagination/foundation.d.ts +8 -8
  115. package/dist/pagination/foundation.js +28 -28
  116. package/dist/pincode/foundation.d.ts +5 -5
  117. package/dist/pincode/foundation.js +22 -22
  118. package/dist/popconfirm/popconfirm-foundation.d.ts +7 -7
  119. package/dist/popconfirm/popconfirm-foundation.js +26 -26
  120. package/dist/radio/radio-foundation.d.ts +5 -5
  121. package/dist/radio/radio-foundation.js +15 -15
  122. package/dist/radio/radio-group-foundation.d.ts +2 -2
  123. package/dist/radio/radio-group-foundation.js +9 -9
  124. package/dist/rating/foundation.d.ts +10 -10
  125. package/dist/rating/foundation.js +35 -35
  126. package/dist/resizable/group/index.d.ts +6 -6
  127. package/dist/resizable/group/index.js +40 -40
  128. package/dist/resizable/single/index.d.ts +2 -2
  129. package/dist/resizable/single/index.js +9 -9
  130. package/dist/scroll-list/item-foundation.d.ts +7 -7
  131. package/dist/scroll-list/item-foundation.js +35 -35
  132. package/dist/select/foundation.d.ts +42 -56
  133. package/dist/select/foundation.js +214 -279
  134. package/dist/select/option-foundation.d.ts +23 -27
  135. package/dist/select/option-foundation.js +10 -18
  136. package/dist/side-sheet/side-sheet-foundation.d.ts +6 -6
  137. package/dist/side-sheet/side-sheet-foundation.js +22 -22
  138. package/dist/slider/foundation.d.ts +16 -16
  139. package/dist/slider/foundation.js +46 -46
  140. package/dist/sortable/accessibility.d.ts +1 -1
  141. package/dist/sortable/accessibility.js +2 -2
  142. package/dist/spin/foundation.d.ts +2 -2
  143. package/dist/spin/foundation.js +6 -6
  144. package/dist/steps/utils.d.ts +1 -1
  145. package/dist/switch/foundation.d.ts +2 -2
  146. package/dist/switch/foundation.js +7 -7
  147. package/dist/table/foundation.d.ts +14 -14
  148. package/dist/table/foundation.js +93 -93
  149. package/dist/table/utils.d.ts +2 -2
  150. package/dist/tabs/foundation.d.ts +5 -5
  151. package/dist/tabs/foundation.js +17 -17
  152. package/dist/tag-input/foundation.d.ts +11 -11
  153. package/dist/tag-input/foundation.js +52 -52
  154. package/dist/time-picker/foundation.d.ts +13 -13
  155. package/dist/time-picker/foundation.js +39 -39
  156. package/dist/time-picker/input-foundation.d.ts +4 -4
  157. package/dist/time-picker/input-foundation.js +13 -13
  158. package/dist/toast/toast-list-foundation.d.ts +7 -7
  159. package/dist/toast/toast-list-foundation.js +14 -14
  160. package/dist/tooltip/foundation.d.ts +9 -9
  161. package/dist/tooltip/foundation.js +67 -61
  162. package/dist/transfer/foundation.d.ts +22 -9
  163. package/dist/transfer/foundation.js +38 -23
  164. package/dist/tree/foundation.d.ts +14 -14
  165. package/dist/tree/foundation.js +61 -61
  166. package/dist/tree/shared.d.ts +1 -1
  167. package/dist/tree-select/foundation.d.ts +26 -20
  168. package/dist/tree-select/foundation.js +91 -83
  169. package/dist/typography/ellipsis.d.ts +4 -4
  170. package/dist/typography/ellipsis.js +8 -8
  171. package/dist/typography/format-numeral.d.ts +1 -1
  172. package/dist/typography/format-numeral.js +2 -2
  173. package/dist/upload/constants.d.ts +1 -1
  174. package/dist/upload/foundation.d.ts +17 -17
  175. package/dist/upload/foundation.js +92 -92
  176. package/dist/upload/utils.d.ts +3 -3
  177. package/dist/upload/utils.js +6 -6
  178. package/dist/user-guide/foundation.d.ts +3 -3
  179. package/dist/user-guide/foundation.js +19 -19
  180. package/dist/utils/a11y.d.ts +1 -1
  181. package/dist/utils/announcer.d.ts +2 -2
  182. package/dist/utils/announcer.js +4 -4
  183. package/dist/utils/focus-handle.d.ts +1 -1
  184. package/dist/utils/focus-handle.js +1 -2
  185. package/dist/utils/focus-scope.d.ts +5 -5
  186. package/dist/utils/focus-scope.js +10 -10
  187. package/dist/utils/is-promise.d.ts +1 -1
  188. package/dist/utils/release-holder.d.ts +2 -2
  189. package/dist/utils/release-holder.js +4 -4
  190. package/dist/video-player/foundation.d.ts +15 -15
  191. package/dist/video-player/foundation.js +89 -89
  192. package/dist/video-player/progress-foundation.d.ts +2 -2
  193. package/dist/video-player/progress-foundation.js +12 -12
  194. package/package.json +2 -2
@@ -274,14 +274,14 @@ var CropperFoundation = class extends BaseFoundation {
274
274
  }
275
275
  }
276
276
  #readContainerSize() {
277
- const container = this._adapter.getContainer();
277
+ const container = this.adapter.getContainer();
278
278
  return {
279
279
  width: container.clientWidth,
280
280
  height: container.clientHeight
281
281
  };
282
282
  }
283
283
  #toContainerPoint(clientX, clientY) {
284
- const container = this._adapter.getContainer();
284
+ const container = this.adapter.getContainer();
285
285
  const rect = container.getBoundingClientRect();
286
286
  return {
287
287
  x: clientX - rect.left - container.clientLeft,
@@ -518,7 +518,7 @@ var CropperFoundation = class extends BaseFoundation {
518
518
  destroy() {
519
519
  this.#removePreview();
520
520
  }
521
- handleResize() {
521
+ handleResize = () => {
522
522
  const { loaded } = this.getStates();
523
523
  if (!loaded) return;
524
524
  const newContainerData = this.#readContainerSize();
@@ -538,12 +538,12 @@ var CropperFoundation = class extends BaseFoundation {
538
538
  imgData: newImgData,
539
539
  cropperBox: newCropperBox
540
540
  });
541
- }
541
+ };
542
542
  /**
543
543
  * Refits the crop box to a changed `aspectRatio`: height stays, width follows, and a box too big for the
544
544
  * container shrinks. It stays centered, moved only as far as the container edges require.
545
545
  */
546
- applyAspectRatio() {
546
+ applyAspectRatio = () => {
547
547
  const { aspectRatio } = this.getProps();
548
548
  const { cropperBox, loaded } = this.getStates();
549
549
  const { width: containerWidth, height: containerHeight } = this.#containerData;
@@ -566,20 +566,21 @@ var CropperFoundation = class extends BaseFoundation {
566
566
  y: clamp(cropperBox.centerPoint.y, height / 2, containerHeight - height / 2)
567
567
  }
568
568
  } });
569
- }
570
- handleImageLoad(e) {
571
- const { naturalWidth, naturalHeight } = e.target;
569
+ };
570
+ handleImageLoad = ({ target }) => {
571
+ if (!(target instanceof HTMLImageElement)) return;
572
+ const { naturalWidth, naturalHeight } = target;
572
573
  this.#containerData = this.#readContainerSize();
573
574
  this.#imgData.originalWidth = naturalWidth;
574
575
  this.#imgData.originalHeight = naturalHeight;
575
576
  this.#layoutImage();
576
577
  this.#renderPreview();
577
- }
578
+ };
578
579
  /**
579
580
  * Brings the state to the `rotate` and `zoom` props once the image has loaded; a controlled zoom also undoes
580
581
  * wheel zooming the parent does not accept. Turns and scales around the cropper box center.
581
582
  */
582
- syncRotateAndZoom({ rotate: newRotate, zoom: newZoom } = this.getProps()) {
583
+ syncRotateAndZoom = ({ rotate: newRotate, zoom: newZoom } = this.getProps()) => {
583
584
  const { rotate, zoom, imgData, cropperBox, loaded } = this.getStates();
584
585
  const rotateChanged = newRotate !== void 0 && !Object.is(newRotate, rotate);
585
586
  const zoomChanged = newZoom !== void 0 && !Object.is(newZoom, zoom);
@@ -620,7 +621,7 @@ var CropperFoundation = class extends BaseFoundation {
620
621
  }
621
622
  }
622
623
  });
623
- }
624
+ };
624
625
  handleWheel = (e) => {
625
626
  e.preventDefault();
626
627
  if (!this.getStates().loaded) return;
@@ -650,9 +651,9 @@ var CropperFoundation = class extends BaseFoundation {
650
651
  imgData: newImgDataState,
651
652
  zoom: _zoom
652
653
  });
653
- this._adapter.notifyZoomChange(_zoom);
654
+ this.adapter.notifyZoomChange(_zoom);
654
655
  };
655
- updatePreview() {
656
+ updatePreview = () => {
656
657
  if (!this.#previewImg) return;
657
658
  const { cropperBox, imgData, rotate } = this.getStates();
658
659
  const { width, height } = imgData;
@@ -682,18 +683,19 @@ var CropperFoundation = class extends BaseFoundation {
682
683
  this.#previewImg.style.transformOrigin = "center";
683
684
  this.#previewContainer.style.width = `${previewWidth}px`;
684
685
  this.#previewContainer.style.height = `${previewHeight}px`;
685
- }
686
+ };
686
687
  handleCornerPointerDown = (e) => {
687
688
  const currentTarget = e.currentTarget;
688
- if (!currentTarget || isSecondaryPress(e)) return;
689
+ if (!(currentTarget instanceof HTMLElement) || isSecondaryPress(e)) return;
689
690
  e.preventDefault();
690
691
  currentTarget.setPointerCapture(e.pointerId);
691
692
  this.#startCornerResize(currentTarget.dataset.dir);
692
693
  };
693
694
  handleCropperBoxPointerDown = (e) => {
694
- if (e.target.dataset.dir) return;
695
- if (isSecondaryPress(e)) return;
696
- e.currentTarget.setPointerCapture(e.pointerId);
695
+ if (e.target instanceof HTMLElement && e.target.dataset.dir) return;
696
+ const { currentTarget } = e;
697
+ if (!(currentTarget instanceof Element) || isSecondaryPress(e)) return;
698
+ currentTarget.setPointerCapture(e.pointerId);
697
699
  this.#cropperBoxMoveStart = {
698
700
  x: e.clientX,
699
701
  y: e.clientY
@@ -725,20 +727,21 @@ var CropperFoundation = class extends BaseFoundation {
725
727
  }
726
728
  };
727
729
  handleMaskPointerDown = (e) => {
728
- if (e.currentTarget !== e.target || isSecondaryPress(e)) return;
729
- e.currentTarget.setPointerCapture(e.pointerId);
730
+ const { currentTarget } = e;
731
+ if (!(currentTarget instanceof Element) || currentTarget !== e.target || isSecondaryPress(e)) return;
732
+ currentTarget.setPointerCapture(e.pointerId);
730
733
  this.#imgMoveStart = {
731
734
  x: e.clientX,
732
735
  y: e.clientY
733
736
  };
734
737
  };
735
- getCropperCanvas() {
738
+ getCropperCanvas = () => {
736
739
  if (!this.getStates().loaded) throw new Error("[Semi] Cropper: getCropperCanvas called before the image loaded");
737
740
  const { cropperBox, imgData, rotate, zoom } = this.getStates();
738
741
  const { fill } = this.getProps();
739
742
  const canvas = document.createElement("canvas");
740
743
  const ctx = canvas.getContext("2d");
741
- const img = this._adapter.getImg();
744
+ const img = this.adapter.getImg();
742
745
  const angle = rotate * Math.PI / 180;
743
746
  const sine = Math.abs(Math.sin(angle));
744
747
  const cosine = Math.abs(Math.cos(angle));
@@ -799,6 +802,6 @@ var CropperFoundation = class extends BaseFoundation {
799
802
  const imgDataResult = ctx.getImageData(realLeft, realTop, realWidth, realHeight);
800
803
  ctx2.putImageData(imgDataResult, relativeCropLeft < 0 ? -relativeCropLeft : 0, relativeCropTop < 0 ? -relativeCropTop : 0);
801
804
  return canvas2;
802
- }
805
+ };
803
806
  };
804
807
  export { CropperFoundation as default };
@@ -13,7 +13,7 @@ export declare function needConfirm({ type, needConfirm: confirm }: {
13
13
  needConfirm?: boolean;
14
14
  }): boolean;
15
15
  /** These types pick in the year and month panel instead of the day grid */
16
- export declare function isYearOrMonthType(type?: Type): type is "year" | "month" | "monthRange";
16
+ export declare function isYearOrMonthType(type?: Type): type is "month" | "year" | "monthRange";
17
17
  /** monthRange shows its range in one trigger input; the other range types split it into a start and an end input */
18
18
  export declare function isSplitRangeInputs(type?: Type): boolean;
19
19
  /** An empty range (cleared) or one with two valid dates; a half-picked range is neither committed nor confirmed */
@@ -152,7 +152,7 @@ export interface DatePickerFoundationState {
152
152
  cachedSelectedValue: (Date | null)[];
153
153
  prevTimeZone: string | number | null;
154
154
  /** `undefined` until a range input is focused or the value is set */
155
- rangeInputFocus: RangeInput | false | undefined;
155
+ rangeInputFocus?: RangeInput | false;
156
156
  autofocus: boolean;
157
157
  /** value of inset input */
158
158
  insetInputValue: InsetInputValue | null;
@@ -179,7 +179,7 @@ export interface DatePickerAdapter extends DefaultAdapter<DatePickerFoundationPr
179
179
  setRangeInputFocus: (rangeInputFocus: DatePickerFoundationState['rangeInputFocus']) => void;
180
180
  /** focus is in the panel and came from the keyboard (`:focus-visible`), not from a click */
181
181
  isKeyboardFocusInPanel: () => boolean;
182
- isEventTarget: (e: any) => boolean;
182
+ isEventTarget: (e: Pick<Event, 'target' | 'currentTarget'>) => boolean;
183
183
  updateInsetInputValue: (insetInputValue: InsetInputValue) => void;
184
184
  setInsetInputFocus: () => void;
185
185
  /** `callback` runs once the trigger renders with the new disabled state */
@@ -252,52 +252,52 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
252
252
  */
253
253
  static getInitialState(props: DatePickerFoundationProps): Pick<DatePickerFoundationState, 'value' | 'cachedSelectedValue' | 'rangeInputFocus' | 'inputValue' | 'prevTimeZone'>;
254
254
  init(): void;
255
- initFromProps({ value, timeZone, prevTimeZone }: Pick<DatePickerFoundationProps, 'value' | 'timeZone'> & {
255
+ initFromProps: ({ value, timeZone, prevTimeZone }: Pick<DatePickerFoundationProps, "value" | "timeZone"> & {
256
256
  prevTimeZone?: string | number;
257
- }): void;
257
+ }) => void;
258
258
  /** Called for a mousedown outside the trigger and the panel while the panel is shown */
259
- handleClickOutside(e: MouseEvent): void;
259
+ handleClickOutside: (e: MouseEvent) => void;
260
260
  /** @param e the mousedown outside that closes the panel, passed on to onBlur */
261
261
  closePanel(e?: MouseEvent): void;
262
- open(): void;
262
+ open: () => void;
263
263
  /** The controlled `open` turned true: starts what an uncontrolled open would */
264
- handleControlledOpen(): void;
265
- handleEscKeyDown(): void;
266
- close(e?: MouseEvent): void;
264
+ handleControlledOpen: () => void;
265
+ handleEscKeyDown: () => void;
266
+ close: (e?: MouseEvent) => void;
267
267
  /** Closes the panel without a blur or a returned focus, as when a Vue KeepAlive deactivates the host */
268
- deactivate(): void;
268
+ deactivate: () => void;
269
269
  destroy(): void;
270
- focus(focusType?: RangeInput): void;
271
- blur(): void;
270
+ focus: (focusType?: RangeInput) => void;
271
+ blur: () => void;
272
272
  /** The controlled `open` turned false: clears what an uncontrolled close would */
273
- handleControlledClose(): void;
273
+ handleControlledClose: () => void;
274
274
  /** Whether the range input other than `currentRangeInput` has been focused since the panel opened */
275
- hasOtherRangeInputBeenFocused(currentRangeInput: RangeInput): boolean;
276
- handleInputChange(input: string, e: any): void;
275
+ hasOtherRangeInputBeenFocused: (currentRangeInput: RangeInput) => boolean;
276
+ handleInputChange: (input: string, e: unknown) => void;
277
277
  /**
278
278
  * Always updates insetInputValue; inputValue and value are updated only when the text parses to a valid date.
279
279
  */
280
- handleInsetInputChange({ insetInputStr, format, insetInputValue }: {
280
+ handleInsetInputChange: ({ insetInputStr, format, insetInputValue }: {
281
281
  insetInputStr: string;
282
282
  format: string;
283
283
  insetInputValue: InsetInputValue;
284
- }): void;
285
- handleRangeEndTabPress(): void;
286
- handleInputFocus(e: unknown, range: RangeInput): void;
287
- handleSetRangeFocus(rangeInputFocus: RangeInput | false): void;
288
- handleInputClear(e: any): void;
289
- handleRangeInputClear(e: any): void;
290
- handleInputComplete(input?: string): void;
284
+ }) => void;
285
+ handleRangeEndTabPress: () => void;
286
+ handleInputFocus: (e: unknown, range: RangeInput) => void;
287
+ handleSetRangeFocus: (rangeInputFocus: RangeInput | false) => void;
288
+ handleInputClear: (e: unknown) => void;
289
+ handleRangeInputClear: (e: unknown) => void;
290
+ handleInputComplete: (input?: string) => void;
291
291
  /**
292
292
  * @param options `rangeInputFocus` is the range input the dates were picked for, when the panel has moved
293
293
  * the focus on before telling about the change
294
294
  */
295
- handleSelectedChange(value: Date[], options?: {
295
+ handleSelectedChange: (value: Date[], options?: {
296
296
  needCheckFocusRecord?: boolean;
297
297
  closePanel?: boolean;
298
298
  rangeInputFocus?: RangeInput | false;
299
- }): void;
300
- handleYMSelectedChange({ currentMonth, currentYear }?: {
299
+ }) => void;
300
+ handleYMSelectedChange: ({ currentMonth, currentYear }?: {
301
301
  currentMonth?: {
302
302
  left: number;
303
303
  right: number;
@@ -306,18 +306,18 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
306
306
  left: number;
307
307
  right: number;
308
308
  };
309
- }): void;
310
- handleConfirm(): void;
311
- handleCancel(): void;
312
- handlePresetClick(item: PresetType, e: unknown): void;
313
- disabledDisposeDate(date: Date, ...rest: any[]): boolean;
314
- disabledDisposeTime(date: Date | Date[], ...rest: any[]): ReturnType<DisabledTimeType>;
309
+ }) => void;
310
+ handleConfirm: () => void;
311
+ handleCancel: () => void;
312
+ handlePresetClick: (item: PresetType, e: unknown) => void;
313
+ disabledDisposeDate: (date: Date, ...rest: any[]) => boolean;
314
+ disabledDisposeTime: (date: Date | Date[], ...rest: any[]) => ReturnType<DisabledTimeType>;
315
315
  /**
316
316
  * Opens the panel on trigger click and, for range types, focuses rangeStart when no range input is focused.
317
317
  * Non-range triggers are native inputs that already handle focus. isEventTarget tells a click on the input
318
318
  * wrapper itself from one bubbled up from a child, which already handled focus.
319
319
  */
320
- handleTriggerWrapperClick(e: unknown): void;
320
+ handleTriggerWrapperClick(e: Pick<Event, 'target' | 'currentTarget'>): void;
321
321
  /**
322
322
  * The trigger's click handler. Enter and Space on an inner control of the default trigger (its clear button) click
323
323
  * it, and that click must not open the panel too; a pointer click on it still does. A custom trigger skips the
@@ -325,12 +325,12 @@ export default class DatePickerFoundation extends BaseFoundation<DatePickerAdapt
325
325
  * control that must not open it stops propagation itself). Keys reach handleTriggerWrapperClick through
326
326
  * handleTriggerKeyDown instead, so the check stays out of it.
327
327
  */
328
- handleTriggerClick(e: Pick<MouseEvent, 'detail' | 'target' | 'currentTarget'>, isCustomTrigger: boolean): void;
328
+ handleTriggerClick: (e: Pick<MouseEvent, "detail" | "target" | "currentTarget">, isCustomTrigger: boolean) => void;
329
329
  /**
330
330
  * APG combobox: Down Arrow on the closed trigger opens the panel (once it is open, the Popover moves focus into
331
331
  * it). A custom trigger that is itself the Tab stop is a button, so Enter and Space open it too.
332
332
  */
333
- handleTriggerKeyDown(e: Pick<KeyboardEvent, 'key' | 'preventDefault'>, isTriggerButton: boolean): void;
334
- handlePanelVisibleChange(visible: boolean): void;
333
+ handleTriggerKeyDown: (e: Pick<KeyboardEvent, "key" | "preventDefault" | "target" | "currentTarget">, isTriggerButton: boolean) => void;
334
+ handlePanelVisibleChange: (visible: boolean) => void;
335
335
  }
336
336
  export type { DateInputFoundationProps, RangeInput, Type };