@astral/ui 1.50.1 → 1.52.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 (100) hide show
  1. package/BackdropStack/hooks/useBackdropStackToggle/useBackdropStackToggle.d.ts +2 -2
  2. package/BackdropStack/services/BackdropStackManager/BackdropStackManager.d.ts +30 -2
  3. package/BackdropStack/services/BackdropStackManager/BackdropStackManager.js +35 -3
  4. package/Button/styles.d.ts +1 -1
  5. package/Chevron/styles.d.ts +1 -1
  6. package/ClickAwayListener/ClickAwayListener.d.ts +9 -0
  7. package/ClickAwayListener/ClickAwayListener.js +14 -0
  8. package/ClickAwayListener/ClickAwayListener.test.d.ts +1 -0
  9. package/ClickAwayListener/ClickAwayListener.test.js +37 -0
  10. package/ClickAwayListener/index.d.ts +1 -0
  11. package/{DatePicker/DatePickerClickAwayListener → ClickAwayListener}/index.js +1 -1
  12. package/ConfirmDialog/ConfirmDialog.d.ts +41 -0
  13. package/ConfirmDialog/ConfirmDialog.js +35 -0
  14. package/ConfirmDialog/index.d.ts +1 -0
  15. package/ConfirmDialog/index.js +17 -0
  16. package/DataGrid/DataGridNoData/styles.d.ts +1 -1
  17. package/DatePicker/DatePicker.d.ts +5 -3
  18. package/DatePicker/DatePicker.js +3 -3
  19. package/DatePicker/DatePicker.test.js +6 -0
  20. package/DatePicker/DatePickerInput/DatePickerInput.d.ts +1 -1
  21. package/DatePicker/DatePickerInput/styles.d.ts +1 -1
  22. package/DatePicker/DatePickerPopper/DatePickerPopper.d.ts +2 -2
  23. package/Fab/styles.d.ts +1 -1
  24. package/FormHelperText/FormHelperTextContent/styles.d.ts +2 -2
  25. package/IconButton/styles.d.ts +1 -1
  26. package/MaskField/MaskField.d.ts +1 -1
  27. package/NavMenu/NavMenuItem/NavMenuItemButton/styles.d.ts +1 -1
  28. package/Notification/NotificationTemplate/styled.d.ts +1 -1
  29. package/Notification/styled.d.ts +4 -4
  30. package/Stepper/ArrowConnector/ArrowConnector.d.ts +1 -1
  31. package/Stepper/StepIcon/styles.d.ts +3 -3
  32. package/SwipeableDrawer/styles.d.ts +1 -1
  33. package/Tooltip/styled.d.ts +1 -1
  34. package/esm/BackdropStack/hooks/useBackdropStackToggle/useBackdropStackToggle.d.ts +2 -2
  35. package/esm/BackdropStack/services/BackdropStackManager/BackdropStackManager.d.ts +30 -2
  36. package/esm/BackdropStack/services/BackdropStackManager/BackdropStackManager.js +35 -3
  37. package/esm/Button/styles.d.ts +1 -1
  38. package/esm/Chevron/styles.d.ts +1 -1
  39. package/esm/ClickAwayListener/ClickAwayListener.d.ts +9 -0
  40. package/esm/ClickAwayListener/ClickAwayListener.js +10 -0
  41. package/esm/ClickAwayListener/ClickAwayListener.test.d.ts +1 -0
  42. package/esm/ClickAwayListener/ClickAwayListener.test.js +35 -0
  43. package/esm/ClickAwayListener/index.d.ts +1 -0
  44. package/esm/ClickAwayListener/index.js +1 -0
  45. package/esm/ConfirmDialog/ConfirmDialog.d.ts +41 -0
  46. package/esm/ConfirmDialog/ConfirmDialog.js +31 -0
  47. package/esm/ConfirmDialog/index.d.ts +1 -0
  48. package/esm/ConfirmDialog/index.js +1 -0
  49. package/esm/DataGrid/DataGridNoData/styles.d.ts +1 -1
  50. package/esm/DatePicker/DatePicker.d.ts +5 -3
  51. package/esm/DatePicker/DatePicker.js +3 -3
  52. package/esm/DatePicker/DatePicker.test.js +6 -0
  53. package/esm/DatePicker/DatePickerInput/DatePickerInput.d.ts +1 -1
  54. package/esm/DatePicker/DatePickerInput/styles.d.ts +1 -1
  55. package/esm/DatePicker/DatePickerPopper/DatePickerPopper.d.ts +2 -2
  56. package/esm/Fab/styles.d.ts +1 -1
  57. package/esm/FormHelperText/FormHelperTextContent/styles.d.ts +2 -2
  58. package/esm/IconButton/styles.d.ts +1 -1
  59. package/esm/MaskField/MaskField.d.ts +1 -1
  60. package/esm/NavMenu/NavMenuItem/NavMenuItemButton/styles.d.ts +1 -1
  61. package/esm/Notification/NotificationTemplate/styled.d.ts +1 -1
  62. package/esm/Notification/styled.d.ts +4 -4
  63. package/esm/Stepper/ArrowConnector/ArrowConnector.d.ts +1 -1
  64. package/esm/Stepper/StepIcon/styles.d.ts +3 -3
  65. package/esm/SwipeableDrawer/styles.d.ts +1 -1
  66. package/esm/Tooltip/styled.d.ts +1 -1
  67. package/esm/hooks/index.d.ts +2 -0
  68. package/esm/hooks/index.js +2 -0
  69. package/esm/hooks/useClickAwayEffect/index.d.ts +1 -0
  70. package/esm/hooks/useClickAwayEffect/index.js +1 -0
  71. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.d.ts +25 -0
  72. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.js +26 -0
  73. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.test.d.ts +1 -0
  74. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.test.js +42 -0
  75. package/esm/hooks/useEscapeClickEffect/useEscapeClickEffect.d.ts +2 -2
  76. package/esm/index.d.ts +3 -0
  77. package/esm/index.js +3 -0
  78. package/esm/theme/components/MuiDialogTitle.js +4 -3
  79. package/esm/types.d.ts +5 -1
  80. package/hooks/index.d.ts +2 -0
  81. package/hooks/index.js +2 -0
  82. package/hooks/useClickAwayEffect/index.d.ts +1 -0
  83. package/hooks/useClickAwayEffect/index.js +17 -0
  84. package/hooks/useClickAwayEffect/useClickAwayEffect.d.ts +25 -0
  85. package/hooks/useClickAwayEffect/useClickAwayEffect.js +30 -0
  86. package/hooks/useClickAwayEffect/useClickAwayEffect.test.d.ts +1 -0
  87. package/hooks/useClickAwayEffect/useClickAwayEffect.test.js +44 -0
  88. package/hooks/useEscapeClickEffect/useEscapeClickEffect.d.ts +2 -2
  89. package/index.d.ts +3 -0
  90. package/index.js +3 -0
  91. package/package.json +2 -2
  92. package/theme/components/MuiDialogTitle.js +4 -3
  93. package/types.d.ts +5 -1
  94. package/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.d.ts +0 -6
  95. package/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.js +0 -7
  96. package/DatePicker/DatePickerClickAwayListener/index.d.ts +0 -1
  97. package/esm/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.d.ts +0 -6
  98. package/esm/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.js +0 -3
  99. package/esm/DatePicker/DatePickerClickAwayListener/index.d.ts +0 -1
  100. package/esm/DatePicker/DatePickerClickAwayListener/index.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import { SyntheticEvent } from 'react';
2
- import { Reason } from '../../../types';
2
+ import { CloseEventReason } from '../../../types';
3
3
  /**
4
4
  * @description необязательные настройки для использоввания хука
5
5
  */
@@ -23,7 +23,7 @@ type ReturnElements = {
23
23
  /**
24
24
  * @description метод вызываемый при закрытии элемента, внутри него определяется состояние isOpened
25
25
  */
26
- handleClose: (event?: SyntheticEvent<Element, Event> | Event | {}, reason?: Reason) => void;
26
+ handleClose: (event?: SyntheticEvent<Element, Event> | Event | {}, reason?: CloseEventReason) => void;
27
27
  };
28
28
  type UseBackdropStackToggleFunc = (options?: Options) => ReturnElements;
29
29
  /**
@@ -1,15 +1,43 @@
1
- import { Reason } from '../../../types';
1
+ import { CloseEventReason } from '../../../types';
2
+ /**
3
+ * @description айдишка модалки/поппера/тултипа
4
+ */
2
5
  type PopId = string;
3
6
  declare class BackdropStackManager {
4
7
  private stack;
8
+ /**
9
+ * @description сохраняем информацию о том какой был предыдущий вызов pop,
10
+ * нужен для предотвращения синхронного закрытия при последовательности 'blur' и 'backdropClick' в рамках одного клика
11
+ */
5
12
  private previousPopInfo;
13
+ /**
14
+ * @description крайняя айдишка клика по странице
15
+ */
6
16
  private currentPointerId;
7
17
  constructor();
18
+ /**
19
+ * @description метод проверки на конфликт причины закрытия с предыдущим
20
+ */
8
21
  private checkOn;
22
+ /**
23
+ * @description метод генерации случайной айдишки
24
+ */
9
25
  generateID: () => string;
26
+ /**
27
+ * @description форс метод для удалении подписанного компонента из очереди,
28
+ * может быть полезно при массовом анмаунте компонентов
29
+ */
10
30
  remove: (id: PopId) => void;
31
+ /**
32
+ * @description метод добавления в стек
33
+ */
11
34
  push: (id: PopId) => void;
12
- pop: (id: PopId, reason?: Reason) => boolean;
35
+ /**
36
+ * @description метод для запроса на выход из очереди,
37
+ * если все ок, то вернется true, что означает разрешение на выход и компонент будет вычеркнут из очереди,
38
+ * соответственно возврат false означает запрет, и компонент остается в очереди
39
+ */
40
+ pop: (id: PopId, reason?: CloseEventReason) => boolean;
13
41
  }
14
42
  export declare const backdropStackManager: BackdropStackManager;
15
43
  export {};
@@ -1,29 +1,61 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.backdropStackManager = void 0;
4
+ /**
5
+ * @description расширяемый набор конфликтующих причин закрытия с кликом по бэкдропу модалки,
6
+ * т.к. некоторые способы закрытия вызываются раньше, чем вызов backdropClick,
7
+ * а при несоблюдении последовательности возникают конфликты
8
+ */
9
+ const backdropConflictsReasons = new Set([
10
+ 'blur',
11
+ 'clickAway',
12
+ ]);
4
13
  class BackdropStackManager {
5
14
  constructor() {
6
15
  var _a;
7
16
  this.stack = [];
8
- // сохраняем информацию о том какой был предыдущий вызов pop,
9
- // нужен для предотвращения синхронного закрытия при последовательности 'blur' и 'backdropClick' в рамках одного клика
17
+ /**
18
+ * @description сохраняем информацию о том какой был предыдущий вызов pop,
19
+ * нужен для предотвращения синхронного закрытия при последовательности 'blur' и 'backdropClick' в рамках одного клика
20
+ */
10
21
  this.previousPopInfo = [null, null];
22
+ /**
23
+ * @description крайняя айдишка клика по странице
24
+ */
11
25
  this.currentPointerId = null;
26
+ /**
27
+ * @description метод проверки на конфликт причины закрытия с предыдущим
28
+ */
12
29
  this.checkOn = (reason) => {
13
30
  const [previousReason, previousPointerId] = this.previousPopInfo;
14
31
  return (reason === 'backdropClick' &&
15
- previousReason === 'blur' &&
32
+ backdropConflictsReasons.has(previousReason) &&
16
33
  previousPointerId === this.currentPointerId);
17
34
  };
35
+ /**
36
+ * @description метод генерации случайной айдишки
37
+ */
18
38
  this.generateID = () => {
19
39
  return String(Math.random());
20
40
  };
41
+ /**
42
+ * @description форс метод для удалении подписанного компонента из очереди,
43
+ * может быть полезно при массовом анмаунте компонентов
44
+ */
21
45
  this.remove = (id) => {
22
46
  this.stack = this.stack.filter((item) => item !== id);
23
47
  };
48
+ /**
49
+ * @description метод добавления в стек
50
+ */
24
51
  this.push = (id) => {
25
52
  this.stack.push(id);
26
53
  };
54
+ /**
55
+ * @description метод для запроса на выход из очереди,
56
+ * если все ок, то вернется true, что означает разрешение на выход и компонент будет вычеркнут из очереди,
57
+ * соответственно возврат false означает запрет, и компонент остается в очереди
58
+ */
27
59
  this.pop = (id, reason) => {
28
60
  if (this.checkOn(reason)) {
29
61
  return false;
@@ -64,7 +64,7 @@ export declare const LoadingButtonWrapper: import("@emotion/styled").StyledCompo
64
64
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
65
65
  }, "disabled" | "action" | "color" | "sx" | "href" | "onFocusVisible" | "tabIndex" | "children" | "variant" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableElevation" | "disableFocusRipple" | "endIcon" | "fullWidth" | "startIcon" | "loading" | "loadingIndicator" | "loadingPosition"> & {
66
66
  theme?: import("@emotion/react").Theme | undefined;
67
- } & Omit<import("../types").WithoutEmotionSpecific<import("@mui/lab").LoadingButtonProps<"button", {}>>, "color" | "variant"> & {
67
+ } & Omit<import("..").WithoutEmotionSpecific<import("@mui/lab").LoadingButtonProps<"button", {}>>, "color" | "variant"> & {
68
68
  variant?: "link" | "light" | "text" | "contained" | undefined;
69
69
  color?: "primary" | "error" | "warning" | "success" | undefined;
70
70
  component?: import("react").ElementType<any> | undefined;
@@ -11,7 +11,7 @@ export declare const ChevronWrapper: import("@emotion/styled").StyledComponent<{
11
11
  sx?: import("@mui/system").SxProps<import("@mui/material").Theme> | undefined;
12
12
  titleAccess?: string | undefined;
13
13
  viewBox?: string | undefined;
14
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "fontSize" | "fontWeight" | "fontFamily" | "clipPath" | "color" | "cursor" | "direction" | "display" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "elevation" | "spacing" | "mode" | "css" | "href" | "tabIndex" | "to" | "type" | "children" | "className" | "style" | "path" | "key" | "name" | "id" | "lang" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "values" | "local" | "in" | "end" | "orientation" | "max" | "media" | "target" | "min" | "viewBox" | "method" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "ideographic" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "numOctaves" | "operator" | "orient" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & {
14
+ } & import("@mui/material/OverridableComponent").CommonProps & Omit<Pick<import("react").SVGProps<SVGSVGElement>, "string" | "fontSize" | "fontWeight" | "fontFamily" | "clipPath" | "color" | "cursor" | "direction" | "display" | "filter" | "fontSizeAdjust" | "fontStretch" | "fontStyle" | "fontVariant" | "height" | "imageRendering" | "letterSpacing" | "opacity" | "order" | "paintOrder" | "pointerEvents" | "rotate" | "scale" | "textRendering" | "transform" | "unicodeBidi" | "visibility" | "width" | "wordSpacing" | "writingMode" | "mask" | "offset" | "overflow" | "textDecoration" | "azimuth" | "clip" | "alignmentBaseline" | "baselineShift" | "clipRule" | "colorInterpolation" | "colorRendering" | "dominantBaseline" | "fill" | "fillOpacity" | "fillRule" | "floodColor" | "floodOpacity" | "glyphOrientationVertical" | "lightingColor" | "markerEnd" | "markerMid" | "markerStart" | "shapeRendering" | "stopColor" | "stopOpacity" | "stroke" | "strokeDasharray" | "strokeDashoffset" | "strokeLinecap" | "strokeLinejoin" | "strokeMiterlimit" | "strokeOpacity" | "strokeWidth" | "textAnchor" | "vectorEffect" | "elevation" | "spacing" | "mode" | "css" | "href" | "tabIndex" | "to" | "type" | "children" | "className" | "style" | "path" | "key" | "name" | "id" | "lang" | "role" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "values" | "local" | "end" | "in" | "orientation" | "max" | "media" | "target" | "min" | "viewBox" | "method" | "crossOrigin" | "accentHeight" | "accumulate" | "additive" | "allowReorder" | "alphabetic" | "amplitude" | "arabicForm" | "ascent" | "attributeName" | "attributeType" | "autoReverse" | "baseFrequency" | "baseProfile" | "bbox" | "begin" | "bias" | "by" | "calcMode" | "capHeight" | "clipPathUnits" | "colorInterpolationFilters" | "colorProfile" | "contentScriptType" | "contentStyleType" | "cx" | "cy" | "d" | "decelerate" | "descent" | "diffuseConstant" | "divisor" | "dur" | "dx" | "dy" | "edgeMode" | "enableBackground" | "exponent" | "externalResourcesRequired" | "filterRes" | "filterUnits" | "focusable" | "format" | "fr" | "from" | "fx" | "fy" | "g1" | "g2" | "glyphName" | "glyphOrientationHorizontal" | "glyphRef" | "gradientTransform" | "gradientUnits" | "hanging" | "horizAdvX" | "horizOriginX" | "ideographic" | "in2" | "intercept" | "k1" | "k2" | "k3" | "k4" | "k" | "kernelMatrix" | "kernelUnitLength" | "kerning" | "keyPoints" | "keySplines" | "keyTimes" | "lengthAdjust" | "limitingConeAngle" | "markerHeight" | "markerUnits" | "markerWidth" | "maskContentUnits" | "maskUnits" | "mathematical" | "numOctaves" | "operator" | "orient" | "origin" | "overlinePosition" | "overlineThickness" | "panose1" | "pathLength" | "patternContentUnits" | "patternTransform" | "patternUnits" | "points" | "pointsAtX" | "pointsAtY" | "pointsAtZ" | "preserveAlpha" | "preserveAspectRatio" | "primitiveUnits" | "r" | "radius" | "refX" | "refY" | "renderingIntent" | "repeatCount" | "repeatDur" | "requiredExtensions" | "requiredFeatures" | "restart" | "result" | "rx" | "ry" | "seed" | "slope" | "specularConstant" | "specularExponent" | "speed" | "spreadMethod" | "startOffset" | "stdDeviation" | "stemh" | "stemv" | "stitchTiles" | "strikethroughPosition" | "strikethroughThickness" | "surfaceScale" | "systemLanguage" | "tableValues" | "targetX" | "targetY" | "textLength" | "u1" | "u2" | "underlinePosition" | "underlineThickness" | "unicode" | "unicodeRange" | "unitsPerEm" | "vAlphabetic" | "version" | "vertAdvY" | "vertOriginX" | "vertOriginY" | "vHanging" | "vIdeographic" | "viewTarget" | "vMathematical" | "widths" | "x1" | "x2" | "x" | "xChannelSelector" | "xHeight" | "xlinkActuate" | "xlinkArcrole" | "xlinkHref" | "xlinkRole" | "xlinkShow" | "xlinkTitle" | "xlinkType" | "xmlBase" | "xmlLang" | "xmlns" | "xmlnsXlink" | "xmlSpace" | "y1" | "y2" | "y" | "yChannelSelector" | "z" | "zoomAndPan"> & {
15
15
  ref?: ((instance: SVGSVGElement | null) => void) | import("react").RefObject<SVGSVGElement> | null | undefined;
16
16
  }, "fontSize" | "color" | "shapeRendering" | "sx" | "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "htmlColor" | "inheritViewBox" | "titleAccess" | "viewBox"> & {
17
17
  theme?: import("@emotion/react").Theme | undefined;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { UseClickAwayListenerOptions } from '../hooks';
3
+ export type ClickAwayListenerProps = Omit<UseClickAwayListenerOptions, 'ref'> & {
4
+ children: JSX.Element;
5
+ };
6
+ /**
7
+ * @description компонент предоставляющий обертку для работы с хуком useClickAwayEffect
8
+ */
9
+ export declare const ClickAwayListener: ({ onClickAway, preventBubbling, isActive, children, }: ClickAwayListenerProps) => import("react").FunctionComponentElement<any>;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ClickAwayListener = void 0;
4
+ const react_1 = require("react");
5
+ const hooks_1 = require("../hooks");
6
+ /**
7
+ * @description компонент предоставляющий обертку для работы с хуком useClickAwayEffect
8
+ */
9
+ const ClickAwayListener = ({ onClickAway, preventBubbling, isActive, children, }) => {
10
+ const ref = (0, react_1.useRef)(null);
11
+ (0, hooks_1.useClickAwayEffect)({ ref, onClickAway, preventBubbling, isActive });
12
+ return react_1.Children.only((0, react_1.cloneElement)(children, { ref }));
13
+ };
14
+ exports.ClickAwayListener = ClickAwayListener;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const jsx_runtime_1 = require("react/jsx-runtime");
13
+ const tests_1 = require("@astral/tests");
14
+ const vitest_1 = require("vitest");
15
+ const ClickAwayListener_1 = require("./ClickAwayListener");
16
+ describe('ClickAwayListener', () => {
17
+ it('Props:isActive=true: при клике внутри onClickAway не вызывается', () => __awaiter(void 0, void 0, void 0, function* () {
18
+ const onClickAway = vitest_1.vi.fn();
19
+ (0, tests_1.renderWithTheme)((0, jsx_runtime_1.jsx)(ClickAwayListener_1.ClickAwayListener, Object.assign({ onClickAway: onClickAway, isActive: true }, { children: (0, jsx_runtime_1.jsx)("div", { children: "Lorem" }) })));
20
+ const div = tests_1.screen.getByText('Lorem');
21
+ yield tests_1.userEvents.click(div);
22
+ expect(onClickAway).toBeCalledTimes(0);
23
+ }));
24
+ it('Props:isActive=false: при клике внутри onClickAway не вызывается', () => __awaiter(void 0, void 0, void 0, function* () {
25
+ const onClickAway = vitest_1.vi.fn();
26
+ (0, tests_1.renderWithTheme)((0, jsx_runtime_1.jsx)(ClickAwayListener_1.ClickAwayListener, Object.assign({ onClickAway: onClickAway, isActive: false }, { children: (0, jsx_runtime_1.jsx)("div", { children: "Lorem" }) })));
27
+ const div = tests_1.screen.getByText('Lorem');
28
+ yield tests_1.userEvents.click(div);
29
+ expect(onClickAway).toBeCalledTimes(0);
30
+ }));
31
+ it('Props:isActive=true: при клике снаружи, onClickAway вызывается', () => __awaiter(void 0, void 0, void 0, function* () {
32
+ const onClickAway = vitest_1.vi.fn();
33
+ (0, tests_1.renderWithTheme)((0, jsx_runtime_1.jsx)(ClickAwayListener_1.ClickAwayListener, Object.assign({ onClickAway: onClickAway, isActive: true }, { children: (0, jsx_runtime_1.jsx)("div", { children: "Lorem" }) })));
34
+ yield tests_1.userEvents.click(document.body);
35
+ expect(onClickAway).toBeCalledTimes(1);
36
+ }));
37
+ });
@@ -0,0 +1 @@
1
+ export * from './ClickAwayListener';
@@ -14,4 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./DatePickerClickAwayListener"), exports);
17
+ __exportStar(require("./ClickAwayListener"), exports);
@@ -0,0 +1,41 @@
1
+ import { ReactNode } from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ type ConfirmDialogProps = {
4
+ /**
5
+ * @description Флаг состояния диалога (открыт-закрыт)
6
+ */
7
+ open: boolean;
8
+ /**
9
+ * @description Заголовок диалога
10
+ */
11
+ title: string;
12
+ /**
13
+ * @description Вспомогательный текст
14
+ */
15
+ description?: ReactNode;
16
+ /**
17
+ * @description Функция для закрытия диалога
18
+ */
19
+ onClose: () => void;
20
+ /**
21
+ * @description Параметры кнопок действий
22
+ */
23
+ actions: {
24
+ /**
25
+ * @description Параметры кнопки подтверждения
26
+ * @example <ConfirmDialog actions={{ confirm: { text: 'Название кнопки' }}}
27
+ */
28
+ confirm: ButtonProps & {
29
+ text: string;
30
+ };
31
+ /**
32
+ * @description Параметры кнопки отмены. В качестве действия onClick по-умолчанию используется пропс onClose
33
+ * @example <ConfirmDialog actions={{ cancel: { text: 'Название кнопки' }}}
34
+ */
35
+ cancel?: ButtonProps & {
36
+ text: string;
37
+ };
38
+ };
39
+ };
40
+ export declare const ConfirmDialog: ({ open, title, description, actions, onClose, }: ConfirmDialogProps) => JSX.Element;
41
+ export {};
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.ConfirmDialog = void 0;
15
+ const jsx_runtime_1 = require("react/jsx-runtime");
16
+ const react_1 = require("react");
17
+ const Button_1 = require("../Button");
18
+ const Dialog_1 = require("../Dialog");
19
+ const DialogContent_1 = require("../DialogContent");
20
+ const DialogContentText_1 = require("../DialogContentText");
21
+ const DialogActions_1 = require("../DialogActions");
22
+ const ConfirmDialog = ({ open, title, description, actions, onClose, }) => {
23
+ const _a = actions.confirm, { text: confirmText } = _a, confirmButtonProps = __rest(_a, ["text"]);
24
+ const renderCancelButton = (0, react_1.useMemo)(() => {
25
+ var _a;
26
+ if (actions.cancel) {
27
+ const _b = actions.cancel, { text: cancelText } = _b, cancelButtonProps = __rest(_b, ["text"]);
28
+ const handleCancelClick = ((_a = actions.cancel) === null || _a === void 0 ? void 0 : _a.onClick) || onClose;
29
+ return ((0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, cancelButtonProps, { onClick: handleCancelClick }, { children: cancelText })));
30
+ }
31
+ return null;
32
+ }, [actions.cancel, onClose]);
33
+ return ((0, jsx_runtime_1.jsxs)(Dialog_1.Dialog, Object.assign({ title: title, open: open, onClose: onClose }, { children: [description && ((0, jsx_runtime_1.jsx)(DialogContent_1.DialogContent, { children: (0, jsx_runtime_1.jsx)(DialogContentText_1.DialogContentText, { children: description }) })), (0, jsx_runtime_1.jsxs)(DialogActions_1.DialogActions, { children: [renderCancelButton, (0, jsx_runtime_1.jsx)(Button_1.Button, Object.assign({}, confirmButtonProps, { children: confirmText }))] })] })));
34
+ };
35
+ exports.ConfirmDialog = ConfirmDialog;
@@ -0,0 +1 @@
1
+ export * from './ConfirmDialog';
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./ConfirmDialog"), exports);
@@ -16,7 +16,7 @@ export declare const DataGridNoDataIcon: import("@emotion/styled").StyledCompone
16
16
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
17
17
  export declare const DataGridNoDataFigcaption: import("@emotion/styled").StyledComponent<Pick<import("react").PropsWithChildren<TypographyProps>, string | number | symbol> & import("react").RefAttributes<HTMLElement> & {
18
18
  theme?: import("@emotion/react").Theme | undefined;
19
- } & Omit<import("@mui/material/OverridableComponent").OverrideProps<import("../../types").WithoutEmotionSpecific<import("@mui/material").TypographyTypeMap<{}, "span">>, import("react").ElementType<any>>, "color" | "variant"> & {
19
+ } & Omit<import("@mui/material/OverridableComponent").OverrideProps<import("../..").WithoutEmotionSpecific<import("@mui/material").TypographyTypeMap<{}, "span">>, import("react").ElementType<any>>, "color" | "variant"> & {
20
20
  variant?: import("@mui/material").TypographyVariant | keyof import("@mui/material").TypographyPropsVariantOverrides | undefined;
21
21
  component?: import("react").ElementType<any> | undefined;
22
22
  color?: "primary" | "secondary" | "red" | "green" | "yellow" | "grey" | "error" | "warning" | "info" | "success" | "text" | "textSecondary" | ((theme: import("@mui/material").Theme) => string) | undefined;
@@ -1,7 +1,7 @@
1
1
  import { SyntheticEvent } from 'react';
2
2
  import { TextFieldProps } from '../TextField';
3
3
  import { DateMask } from '../utils/date';
4
- import { Reason } from '../types';
4
+ import { CloseEventReason } from '../types';
5
5
  import { MinMaxDate } from './types';
6
6
  import { MondayFirst } from './DayPicker';
7
7
  export type DatePickerProps = MondayFirst & Partial<MinMaxDate> & {
@@ -16,13 +16,14 @@ export type DatePickerProps = MondayFirst & Partial<MinMaxDate> & {
16
16
  onChange?: (date?: Date) => void;
17
17
  onBlur?: () => void;
18
18
  onOpen?: () => void;
19
- onClose?: (event?: SyntheticEvent<Element, Event> | Event, reason?: Reason) => void;
19
+ onClose?: (event?: SyntheticEvent<Element, Event> | Event, reason?: CloseEventReason) => void;
20
20
  inputProps?: Omit<TextFieldProps, 'ref' | 'value' | 'onChange'>;
21
21
  disabled?: boolean;
22
22
  /**
23
23
  * @description Принимает только Date object, включая невалидную дату Invalid date
24
24
  * */
25
25
  value?: Date;
26
+ className?: string;
26
27
  };
27
28
  export declare const DatePicker: import("react").ForwardRefExoticComponent<MondayFirst & Partial<MinMaxDate> & {
28
29
  /**
@@ -36,11 +37,12 @@ export declare const DatePicker: import("react").ForwardRefExoticComponent<Monda
36
37
  onChange?: ((date?: Date) => void) | undefined;
37
38
  onBlur?: (() => void) | undefined;
38
39
  onOpen?: (() => void) | undefined;
39
- onClose?: ((event?: SyntheticEvent<Element, Event> | Event, reason?: Reason) => void) | undefined;
40
+ onClose?: ((event?: SyntheticEvent<Element, Event> | Event, reason?: CloseEventReason) => void) | undefined;
40
41
  inputProps?: Omit<TextFieldProps, "ref" | "value" | "onChange"> | undefined;
41
42
  disabled?: boolean | undefined;
42
43
  /**
43
44
  * @description Принимает только Date object, включая невалидную дату Invalid date
44
45
  * */
45
46
  value?: Date | undefined;
47
+ className?: string | undefined;
46
48
  } & import("react").RefAttributes<HTMLInputElement>>;
@@ -15,13 +15,13 @@ exports.DatePicker = void 0;
15
15
  const jsx_runtime_1 = require("react/jsx-runtime");
16
16
  const react_1 = require("react");
17
17
  const hooks_1 = require("../hooks");
18
- const DatePickerClickAwayListener_1 = require("./DatePickerClickAwayListener");
18
+ const ClickAwayListener_1 = require("../ClickAwayListener");
19
19
  const DatePickerInput_1 = require("./DatePickerInput");
20
20
  const DatePickerPopper_1 = require("./DatePickerPopper");
21
21
  const MinMaxDateContext_1 = require("./MinMaxDateContext");
22
22
  const YearMonthDayPicker_1 = require("./YearMonthDayPicker");
23
23
  const hooks_2 = require("./hooks");
24
- const DatePickerInner = (0, react_1.forwardRef)(({ onChange, onOpen, onBlur, onClose, mask = 'DD.MM.YYYY', isMondayFirst, inputProps, disabled, value, }, forwardedRef) => {
24
+ const DatePickerInner = (0, react_1.forwardRef)(({ onChange, onOpen, onBlur, onClose, mask = 'DD.MM.YYYY', isMondayFirst, inputProps, disabled, value, className, }, forwardedRef) => {
25
25
  const { maxDate, minDate } = (0, react_1.useContext)(MinMaxDateContext_1.MinMaxDateContext);
26
26
  const ref = (0, hooks_1.useForwardedRef)(forwardedRef);
27
27
  const [isOpenPopper, openPopper, closePopper] = (0, hooks_1.useToggle)({
@@ -47,7 +47,7 @@ const DatePickerInner = (0, react_1.forwardRef)(({ onChange, onOpen, onBlur, onC
47
47
  const handleChangeMaskInput = (e) => {
48
48
  onChangeMaskedValue(e.target.value);
49
49
  };
50
- return ((0, jsx_runtime_1.jsxs)(DatePickerClickAwayListener_1.DatePickerClickAwayListener, Object.assign({ onClickAway: handleClosePopper }, { children: [(0, jsx_runtime_1.jsx)(DatePickerInput_1.DatePickerInput, Object.assign({}, inputProps, { mask: mask, onNativeChange: handleChangeMaskInput, disabled: disabled, value: maskedValue, ref: ref, onFocus: openPopper })), (0, jsx_runtime_1.jsx)(DatePickerPopper_1.DatePickerPopper, Object.assign({ open: isOpenPopper, onClose: handleClosePopper, anchorEl: ref === null || ref === void 0 ? void 0 : ref.current }, { children: (0, jsx_runtime_1.jsx)(YearMonthDayPicker_1.YearMonthDayPicker, { isMondayFirst: isMondayFirst, selectedDate: selectedBaseDate, onChange: handleDayPick, date: selectedBaseDate || baseDate }) }))] })));
50
+ return ((0, jsx_runtime_1.jsx)(ClickAwayListener_1.ClickAwayListener, Object.assign({ isActive: isOpenPopper, onClickAway: handleClosePopper }, { children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: className }, { children: [(0, jsx_runtime_1.jsx)(DatePickerInput_1.DatePickerInput, Object.assign({}, inputProps, { mask: mask, onNativeChange: handleChangeMaskInput, disabled: disabled, value: maskedValue, ref: ref, onFocus: openPopper })), (0, jsx_runtime_1.jsx)(DatePickerPopper_1.DatePickerPopper, Object.assign({ open: isOpenPopper, onClose: handleClosePopper, anchorEl: ref === null || ref === void 0 ? void 0 : ref.current }, { children: (0, jsx_runtime_1.jsx)(YearMonthDayPicker_1.YearMonthDayPicker, { isMondayFirst: isMondayFirst, selectedDate: selectedBaseDate, onChange: handleDayPick, date: selectedBaseDate || baseDate }) }))] })) })));
51
51
  });
52
52
  exports.DatePicker = (0, react_1.forwardRef)((_a, forwardedRef) => {
53
53
  var { minDate, maxDate } = _a, props = __rest(_a, ["minDate", "maxDate"]);
@@ -89,4 +89,10 @@ describe('DatePicker', () => {
89
89
  yield tests_1.userEvents.tab();
90
90
  expect(onBlur).not.toBeCalled();
91
91
  }));
92
+ it('Props:onBlur: не вызывается при клике мимо инпута, если поповер закрыт', () => __awaiter(void 0, void 0, void 0, function* () {
93
+ const onBlur = vitest_1.vi.fn();
94
+ (0, tests_1.renderWithTheme)((0, jsx_runtime_1.jsx)(DatePicker_1.DatePicker, { onBlur: onBlur }));
95
+ yield tests_1.userEvents.click(document.body);
96
+ expect(onBlur).not.toBeCalled();
97
+ }));
92
98
  });
@@ -4,5 +4,5 @@ type DatePickerInputProps = Omit<MaskFieldProps, 'mask' | 'autofix'> & {
4
4
  onNativeChange?: (e: ChangeEvent<HTMLInputElement>) => void;
5
5
  mask: string;
6
6
  };
7
- export declare const DatePickerInput: import("react").ForwardRefExoticComponent<Pick<DatePickerInputProps, "disabled" | "default" | "action" | "color" | "content" | "height" | "translate" | "width" | "margin" | "mask" | "shape" | "error" | "success" | "css" | "href" | "tabIndex" | "type" | "children" | "className" | "cite" | "data" | "form" | "label" | "slot" | "select" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "selected" | "list" | "step" | "classes" | "fullWidth" | "focused" | "required" | "htmlFor" | "autoComplete" | "inputProps" | "inputRef" | "multiline" | "readOnly" | "rows" | "maxRows" | "minRows" | "open" | "start" | "checked" | "alt" | "sizes" | "src" | "srcSet" | "max" | "hiddenLabel" | "wrap" | "cols" | "download" | "hrefLang" | "media" | "rel" | "target" | "min" | "method" | "crossOrigin" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "SelectProps" | "useMap" | "as" | "integrity" | "coords" | "controls" | "loop" | "muted" | "preload" | "dateTime" | "acceptCharset" | "noValidate" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "multiple" | "kind" | "playsInline" | "poster" | "classID" | "wmode" | "charSet" | "autoPlay" | "mediaGroup" | "encType" | "manifest" | "allowFullScreen" | "allowTransparency" | "seamless" | "srcDoc" | "accept" | "capture" | "maxLength" | "minLength" | "challenge" | "keyType" | "keyParams" | "scoped" | "srcLang" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "eager" | "parent" | "prepare" | "validate" | "commit" | "overwrite" | "blocks" | "definitions" | "onAccept" | "onComplete" | "unmask" | "onNativeChange"> & import("react").RefAttributes<HTMLInputElement>>;
7
+ export declare const DatePickerInput: import("react").ForwardRefExoticComponent<Pick<DatePickerInputProps, "disabled" | "default" | "action" | "color" | "content" | "height" | "translate" | "width" | "margin" | "mask" | "shape" | "error" | "success" | "css" | "href" | "tabIndex" | "type" | "children" | "className" | "cite" | "data" | "form" | "label" | "slot" | "select" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "selected" | "list" | "step" | "classes" | "fullWidth" | "focused" | "required" | "htmlFor" | "autoComplete" | "inputProps" | "inputRef" | "multiline" | "readOnly" | "rows" | "maxRows" | "minRows" | "start" | "open" | "checked" | "alt" | "sizes" | "src" | "srcSet" | "max" | "hiddenLabel" | "wrap" | "cols" | "download" | "hrefLang" | "media" | "rel" | "target" | "min" | "method" | "crossOrigin" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "SelectProps" | "useMap" | "as" | "integrity" | "coords" | "controls" | "loop" | "muted" | "preload" | "dateTime" | "acceptCharset" | "noValidate" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "multiple" | "kind" | "playsInline" | "poster" | "classID" | "wmode" | "charSet" | "autoPlay" | "mediaGroup" | "encType" | "manifest" | "allowFullScreen" | "allowTransparency" | "seamless" | "srcDoc" | "accept" | "capture" | "maxLength" | "minLength" | "challenge" | "keyType" | "keyParams" | "scoped" | "srcLang" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "eager" | "parent" | "prepare" | "validate" | "commit" | "overwrite" | "blocks" | "definitions" | "onAccept" | "onComplete" | "unmask" | "onNativeChange"> & import("react").RefAttributes<HTMLInputElement>>;
8
8
  export {};
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
- export declare const DatePickerInputWrapper: import("@emotion/styled").StyledComponent<Pick<import("../../MaskField").MaskFieldProps, "disabled" | "default" | "action" | "color" | "content" | "height" | "translate" | "width" | "margin" | "mask" | "shape" | "error" | "success" | "css" | "href" | "tabIndex" | "type" | "children" | "className" | "cite" | "data" | "form" | "label" | "slot" | "select" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "selected" | "list" | "step" | "classes" | "fullWidth" | "focused" | "required" | "htmlFor" | "autoComplete" | "inputProps" | "inputRef" | "multiline" | "readOnly" | "rows" | "maxRows" | "minRows" | "open" | "start" | "checked" | "alt" | "sizes" | "src" | "srcSet" | "max" | "hiddenLabel" | "wrap" | "cols" | "download" | "hrefLang" | "media" | "rel" | "target" | "min" | "method" | "crossOrigin" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "SelectProps" | "useMap" | "as" | "integrity" | "coords" | "controls" | "loop" | "muted" | "preload" | "dateTime" | "acceptCharset" | "noValidate" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "multiple" | "kind" | "playsInline" | "poster" | "classID" | "wmode" | "charSet" | "autoPlay" | "mediaGroup" | "encType" | "manifest" | "allowFullScreen" | "allowTransparency" | "seamless" | "srcDoc" | "accept" | "capture" | "maxLength" | "minLength" | "challenge" | "keyType" | "keyParams" | "scoped" | "srcLang" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "eager" | "parent" | "prepare" | "validate" | "commit" | "overwrite" | "blocks" | "definitions" | "autofix" | "onAccept" | "onComplete" | "unmask"> & import("react").RefAttributes<HTMLInputElement> & {
2
+ export declare const DatePickerInputWrapper: import("@emotion/styled").StyledComponent<Pick<import("../../MaskField").MaskFieldProps, "disabled" | "default" | "action" | "color" | "content" | "height" | "translate" | "width" | "margin" | "mask" | "shape" | "error" | "success" | "css" | "href" | "tabIndex" | "type" | "children" | "className" | "cite" | "data" | "form" | "label" | "slot" | "select" | "span" | "style" | "summary" | "title" | "pattern" | "key" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "name" | "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "variant" | "size" | "selected" | "list" | "step" | "classes" | "fullWidth" | "focused" | "required" | "htmlFor" | "autoComplete" | "inputProps" | "inputRef" | "multiline" | "readOnly" | "rows" | "maxRows" | "minRows" | "start" | "open" | "checked" | "alt" | "sizes" | "src" | "srcSet" | "max" | "hiddenLabel" | "wrap" | "cols" | "download" | "hrefLang" | "media" | "rel" | "target" | "min" | "method" | "crossOrigin" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "SelectProps" | "useMap" | "as" | "integrity" | "coords" | "controls" | "loop" | "muted" | "preload" | "dateTime" | "acceptCharset" | "noValidate" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "httpEquiv" | "high" | "low" | "optimum" | "reversed" | "async" | "defer" | "multiple" | "kind" | "playsInline" | "poster" | "classID" | "wmode" | "charSet" | "autoPlay" | "mediaGroup" | "encType" | "manifest" | "allowFullScreen" | "allowTransparency" | "seamless" | "srcDoc" | "accept" | "capture" | "maxLength" | "minLength" | "challenge" | "keyType" | "keyParams" | "scoped" | "srcLang" | "InputProps" | "FormHelperTextProps" | "helperText" | "InputLabelProps" | "eager" | "parent" | "prepare" | "validate" | "commit" | "overwrite" | "blocks" | "definitions" | "autofix" | "onAccept" | "onComplete" | "unmask"> & import("react").RefAttributes<HTMLInputElement> & {
3
3
  theme?: import("@emotion/react").Theme | undefined;
4
4
  }, {}, {}>;
@@ -1,7 +1,7 @@
1
1
  import { PropsWithChildren, SyntheticEvent } from 'react';
2
2
  import { PopperProps } from '@mui/material';
3
- import { Reason, WithoutEmotionSpecific } from '../../types';
3
+ import { CloseEventReason, WithoutEmotionSpecific } from '../../types';
4
4
  export type DatePickerProps = PropsWithChildren<Omit<WithoutEmotionSpecific<PopperProps>, 'children'>> & {
5
- onClose?: (_?: SyntheticEvent<Element, Event> | Event, reason?: Reason) => void;
5
+ onClose?: (_?: SyntheticEvent<Element, Event> | Event, reason?: CloseEventReason) => void;
6
6
  };
7
7
  export declare const DatePickerPopper: ({ children, onClose, ...props }: DatePickerProps) => JSX.Element;
package/Fab/styles.d.ts CHANGED
@@ -30,7 +30,7 @@ export declare const StyledFab: import("@emotion/styled").StyledComponent<{
30
30
  ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
31
31
  }, "disabled" | "action" | "color" | "sx" | "href" | "onFocusVisible" | "tabIndex" | "children" | "variant" | "size" | keyof import("@mui/material/OverridableComponent").CommonProps | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "TouchRippleProps" | "touchRippleRef" | "disableFocusRipple"> & {
32
32
  theme?: import("@emotion/react").Theme | undefined;
33
- } & Omit<import("../types").WithoutEmotionSpecific<import("@mui/material").FabProps<"button", {}>>, "color" | "variant"> & {
33
+ } & Omit<import("..").WithoutEmotionSpecific<import("@mui/material").FabProps<"button", {}>>, "color" | "variant"> & {
34
34
  color?: "primary" | "default" | "error" | "warning" | "success" | undefined;
35
35
  variant?: "square" | "circular" | "extended" | undefined;
36
36
  } & {