@astral/ui 1.50.1 → 1.51.1

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 (70) 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/ClickAwayListener/ClickAwayListener.d.ts +9 -0
  6. package/ClickAwayListener/ClickAwayListener.js +14 -0
  7. package/ClickAwayListener/ClickAwayListener.test.d.ts +1 -0
  8. package/ClickAwayListener/ClickAwayListener.test.js +37 -0
  9. package/ClickAwayListener/index.d.ts +1 -0
  10. package/{DatePicker/DatePickerClickAwayListener → ClickAwayListener}/index.js +1 -1
  11. package/DataGrid/DataGridNoData/styles.d.ts +1 -1
  12. package/DatePicker/DatePicker.d.ts +5 -3
  13. package/DatePicker/DatePicker.js +3 -3
  14. package/DatePicker/DatePicker.test.js +6 -0
  15. package/DatePicker/DatePickerPopper/DatePickerPopper.d.ts +2 -2
  16. package/Fab/styles.d.ts +1 -1
  17. package/IconButton/styles.d.ts +1 -1
  18. package/SwipeableDrawer/styles.d.ts +1 -1
  19. package/Tooltip/styled.d.ts +1 -1
  20. package/esm/BackdropStack/hooks/useBackdropStackToggle/useBackdropStackToggle.d.ts +2 -2
  21. package/esm/BackdropStack/services/BackdropStackManager/BackdropStackManager.d.ts +30 -2
  22. package/esm/BackdropStack/services/BackdropStackManager/BackdropStackManager.js +35 -3
  23. package/esm/Button/styles.d.ts +1 -1
  24. package/esm/ClickAwayListener/ClickAwayListener.d.ts +9 -0
  25. package/esm/ClickAwayListener/ClickAwayListener.js +10 -0
  26. package/esm/ClickAwayListener/ClickAwayListener.test.d.ts +1 -0
  27. package/esm/ClickAwayListener/ClickAwayListener.test.js +35 -0
  28. package/esm/ClickAwayListener/index.d.ts +1 -0
  29. package/esm/ClickAwayListener/index.js +1 -0
  30. package/esm/DataGrid/DataGridNoData/styles.d.ts +1 -1
  31. package/esm/DatePicker/DatePicker.d.ts +5 -3
  32. package/esm/DatePicker/DatePicker.js +3 -3
  33. package/esm/DatePicker/DatePicker.test.js +6 -0
  34. package/esm/DatePicker/DatePickerPopper/DatePickerPopper.d.ts +2 -2
  35. package/esm/Fab/styles.d.ts +1 -1
  36. package/esm/IconButton/styles.d.ts +1 -1
  37. package/esm/SwipeableDrawer/styles.d.ts +1 -1
  38. package/esm/Tooltip/styled.d.ts +1 -1
  39. package/esm/hooks/index.d.ts +2 -0
  40. package/esm/hooks/index.js +2 -0
  41. package/esm/hooks/useClickAwayEffect/index.d.ts +1 -0
  42. package/esm/hooks/useClickAwayEffect/index.js +1 -0
  43. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.d.ts +25 -0
  44. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.js +26 -0
  45. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.test.d.ts +1 -0
  46. package/esm/hooks/useClickAwayEffect/useClickAwayEffect.test.js +42 -0
  47. package/esm/hooks/useEscapeClickEffect/useEscapeClickEffect.d.ts +2 -2
  48. package/esm/index.d.ts +2 -0
  49. package/esm/index.js +2 -0
  50. package/esm/types.d.ts +5 -1
  51. package/hooks/index.d.ts +2 -0
  52. package/hooks/index.js +2 -0
  53. package/hooks/useClickAwayEffect/index.d.ts +1 -0
  54. package/hooks/useClickAwayEffect/index.js +17 -0
  55. package/hooks/useClickAwayEffect/useClickAwayEffect.d.ts +25 -0
  56. package/hooks/useClickAwayEffect/useClickAwayEffect.js +30 -0
  57. package/hooks/useClickAwayEffect/useClickAwayEffect.test.d.ts +1 -0
  58. package/hooks/useClickAwayEffect/useClickAwayEffect.test.js +44 -0
  59. package/hooks/useEscapeClickEffect/useEscapeClickEffect.d.ts +2 -2
  60. package/index.d.ts +2 -0
  61. package/index.js +2 -0
  62. package/package.json +2 -2
  63. package/types.d.ts +5 -1
  64. package/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.d.ts +0 -6
  65. package/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.js +0 -7
  66. package/DatePicker/DatePickerClickAwayListener/index.d.ts +0 -1
  67. package/esm/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.d.ts +0 -6
  68. package/esm/DatePicker/DatePickerClickAwayListener/DatePickerClickAwayListener.js +0 -3
  69. package/esm/DatePicker/DatePickerClickAwayListener/index.d.ts +0 -1
  70. 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;
@@ -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);
@@ -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
  });
@@ -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
  } & {
@@ -8,7 +8,7 @@ export declare const getButtonSize: ({ size, }: IconButtonWrapperThemeProps) =>
8
8
  export declare const getButtonSizeMobile: ({ size, }: IconButtonWrapperThemeProps) => string;
9
9
  export declare const IconButtonWrapper: import("@emotion/styled").StyledComponent<Pick<import("../ButtonBase").BaseButtonProps, "color" | "translate" | keyof import("@mui/base").ButtonUnstyledOwnProps | "form" | "slot" | "style" | "title" | "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" | "component" | "variant" | "size" | "selected"> & import("react").RefAttributes<HTMLButtonElement> & {
10
10
  theme?: import("@emotion/react").Theme | undefined;
11
- } & Omit<import("../types").WithoutEmotionSpecific<import("@mui/lab").LoadingButtonProps<"button", {}>>, "color" | "variant"> & {
11
+ } & Omit<import("..").WithoutEmotionSpecific<import("@mui/lab").LoadingButtonProps<"button", {}>>, "color" | "variant"> & {
12
12
  variant?: "link" | "light" | "text" | "contained" | undefined;
13
13
  color?: "primary" | "error" | "warning" | "success" | undefined;
14
14
  component?: import("react").ElementType<any> | undefined;
@@ -40,7 +40,7 @@ export declare const SwipeableDrawerTitle: import("@emotion/styled").StyledCompo
40
40
  ref?: ((instance: HTMLSpanElement | null) => void) | import("react").RefObject<HTMLSpanElement> | null | undefined;
41
41
  }, "sx" | "children" | "variant" | keyof import("@mui/material/OverridableComponent").CommonProps | ("fontSize" | "fontWeight" | "lineHeight" | "fontFamily" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxShadow" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "overflow" | "padding" | "typography" | "p" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "displayPrint") | "align" | "gutterBottom" | "noWrap" | "paragraph" | "variantMapping"> & {
42
42
  theme?: import("@emotion/react").Theme | undefined;
43
- } & Omit<import("@mui/material/OverridableComponent").OverrideProps<import("../types").WithoutEmotionSpecific<import("@mui/material").TypographyTypeMap<{}, "span">>, import("react").ElementType<any>>, "color" | "variant"> & {
43
+ } & Omit<import("@mui/material/OverridableComponent").OverrideProps<import("..").WithoutEmotionSpecific<import("@mui/material").TypographyTypeMap<{}, "span">>, import("react").ElementType<any>>, "color" | "variant"> & {
44
44
  variant?: import("@mui/material").TypographyVariant | keyof import("@mui/material").TypographyPropsVariantOverrides | undefined;
45
45
  component?: import("react").ElementType<any> | undefined;
46
46
  color?: "primary" | "secondary" | "red" | "green" | "yellow" | "grey" | "error" | "warning" | "info" | "success" | "text" | "textSecondary" | ((theme: import("@mui/material").Theme) => string) | undefined;
@@ -1,4 +1,4 @@
1
- export declare const StyledTooltip: import("@emotion/styled").StyledComponent<import("../types").WithoutEmotionSpecific<import("@mui/material").TooltipProps> & {
1
+ export declare const StyledTooltip: import("@emotion/styled").StyledComponent<import("..").WithoutEmotionSpecific<import("@mui/material").TooltipProps> & {
2
2
  size?: "medium" | "small" | undefined;
3
3
  } & {
4
4
  theme?: import("@emotion/react").Theme | undefined;
@@ -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,26 +1,58 @@
1
+ /**
2
+ * @description расширяемый набор конфликтующих причин закрытия с кликом по бэкдропу модалки,
3
+ * т.к. некоторые способы закрытия вызываются раньше, чем вызов backdropClick,
4
+ * а при несоблюдении последовательности возникают конфликты
5
+ */
6
+ const backdropConflictsReasons = new Set([
7
+ 'blur',
8
+ 'clickAway',
9
+ ]);
1
10
  class BackdropStackManager {
2
11
  constructor() {
3
12
  var _a;
4
13
  this.stack = [];
5
- // сохраняем информацию о том какой был предыдущий вызов pop,
6
- // нужен для предотвращения синхронного закрытия при последовательности 'blur' и 'backdropClick' в рамках одного клика
14
+ /**
15
+ * @description сохраняем информацию о том какой был предыдущий вызов pop,
16
+ * нужен для предотвращения синхронного закрытия при последовательности 'blur' и 'backdropClick' в рамках одного клика
17
+ */
7
18
  this.previousPopInfo = [null, null];
19
+ /**
20
+ * @description крайняя айдишка клика по странице
21
+ */
8
22
  this.currentPointerId = null;
23
+ /**
24
+ * @description метод проверки на конфликт причины закрытия с предыдущим
25
+ */
9
26
  this.checkOn = (reason) => {
10
27
  const [previousReason, previousPointerId] = this.previousPopInfo;
11
28
  return (reason === 'backdropClick' &&
12
- previousReason === 'blur' &&
29
+ backdropConflictsReasons.has(previousReason) &&
13
30
  previousPointerId === this.currentPointerId);
14
31
  };
32
+ /**
33
+ * @description метод генерации случайной айдишки
34
+ */
15
35
  this.generateID = () => {
16
36
  return String(Math.random());
17
37
  };
38
+ /**
39
+ * @description форс метод для удалении подписанного компонента из очереди,
40
+ * может быть полезно при массовом анмаунте компонентов
41
+ */
18
42
  this.remove = (id) => {
19
43
  this.stack = this.stack.filter((item) => item !== id);
20
44
  };
45
+ /**
46
+ * @description метод добавления в стек
47
+ */
21
48
  this.push = (id) => {
22
49
  this.stack.push(id);
23
50
  };
51
+ /**
52
+ * @description метод для запроса на выход из очереди,
53
+ * если все ок, то вернется true, что означает разрешение на выход и компонент будет вычеркнут из очереди,
54
+ * соответственно возврат false означает запрет, и компонент остается в очереди
55
+ */
24
56
  this.pop = (id, reason) => {
25
57
  if (this.checkOn(reason)) {
26
58
  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;
@@ -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,10 @@
1
+ import { Children, cloneElement, useRef } from 'react';
2
+ import { useClickAwayEffect } from '../hooks';
3
+ /**
4
+ * @description компонент предоставляющий обертку для работы с хуком useClickAwayEffect
5
+ */
6
+ export const ClickAwayListener = ({ onClickAway, preventBubbling, isActive, children, }) => {
7
+ const ref = useRef(null);
8
+ useClickAwayEffect({ ref, onClickAway, preventBubbling, isActive });
9
+ return Children.only(cloneElement(children, { ref }));
10
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,35 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { renderWithTheme, screen, userEvents } from '@astral/tests';
12
+ import { vi } from 'vitest';
13
+ import { ClickAwayListener } from './ClickAwayListener';
14
+ describe('ClickAwayListener', () => {
15
+ it('Props:isActive=true: при клике внутри onClickAway не вызывается', () => __awaiter(void 0, void 0, void 0, function* () {
16
+ const onClickAway = vi.fn();
17
+ renderWithTheme(_jsx(ClickAwayListener, Object.assign({ onClickAway: onClickAway, isActive: true }, { children: _jsx("div", { children: "Lorem" }) })));
18
+ const div = screen.getByText('Lorem');
19
+ yield userEvents.click(div);
20
+ expect(onClickAway).toBeCalledTimes(0);
21
+ }));
22
+ it('Props:isActive=false: при клике внутри onClickAway не вызывается', () => __awaiter(void 0, void 0, void 0, function* () {
23
+ const onClickAway = vi.fn();
24
+ renderWithTheme(_jsx(ClickAwayListener, Object.assign({ onClickAway: onClickAway, isActive: false }, { children: _jsx("div", { children: "Lorem" }) })));
25
+ const div = screen.getByText('Lorem');
26
+ yield userEvents.click(div);
27
+ expect(onClickAway).toBeCalledTimes(0);
28
+ }));
29
+ it('Props:isActive=true: при клике снаружи, onClickAway вызывается', () => __awaiter(void 0, void 0, void 0, function* () {
30
+ const onClickAway = vi.fn();
31
+ renderWithTheme(_jsx(ClickAwayListener, Object.assign({ onClickAway: onClickAway, isActive: true }, { children: _jsx("div", { children: "Lorem" }) })));
32
+ yield userEvents.click(document.body);
33
+ expect(onClickAway).toBeCalledTimes(1);
34
+ }));
35
+ });
@@ -0,0 +1 @@
1
+ export * from './ClickAwayListener';
@@ -0,0 +1 @@
1
+ export * from './ClickAwayListener';
@@ -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;