@plesk/ui-library 3.34.2 → 3.35.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 (119) hide show
  1. package/cjs/components/ContentLoader/IconsLoader.js +1 -2
  2. package/cjs/components/Dropdown/Dropdown.js +0 -2
  3. package/cjs/components/Dropdown/index.js +15 -2
  4. package/cjs/components/Figure/Figure.js +1 -33
  5. package/cjs/components/Figure/index.js +15 -2
  6. package/cjs/components/Form/Form.js +3 -3
  7. package/cjs/components/Form/ScrollableElementFormContext.js +1 -1
  8. package/cjs/components/Form/index.js +19 -3
  9. package/cjs/components/FormFieldPassword/PasswordMeter.js +4 -4
  10. package/cjs/components/Icon/constants.js +2 -2
  11. package/cjs/components/Icon/images/symbols.svg +23 -1
  12. package/cjs/components/Link/Link.js +11 -18
  13. package/cjs/components/Overlay/Overlay.js +3 -4
  14. package/cjs/components/Popper/Popper.js +14 -79
  15. package/cjs/components/Popper/index.js +15 -2
  16. package/cjs/components/Progress/Progress.js +8 -28
  17. package/cjs/components/ProgressStep/ProgressStep.js +4 -46
  18. package/cjs/components/ProgressStep/index.js +36 -12
  19. package/cjs/components/Section/Section.js +1 -2
  20. package/cjs/components/Skeleton/SkeletonText.js +1 -1
  21. package/cjs/components/SplitButton/SplitButton.js +10 -49
  22. package/cjs/components/SplitButton/index.js +15 -2
  23. package/cjs/components/Switch/Switch.js +43 -118
  24. package/cjs/components/Tooltip/Tooltip.js +35 -64
  25. package/cjs/components/Translate/Translate.js +10 -78
  26. package/cjs/components/Translate/index.js +4 -4
  27. package/cjs/components/Translate/isLikeText.js +27 -0
  28. package/cjs/components/utils.js +1 -1
  29. package/cjs/index.js +1 -1
  30. package/cjs/tests/index.js +13 -0
  31. package/cjs/tests/renderer.js +27 -0
  32. package/dist/.DS_Store +0 -0
  33. package/dist/images/default.svg +1 -0
  34. package/dist/images/filtered.svg +1 -0
  35. package/dist/images/symbols.svg +23 -1
  36. package/dist/plesk-ui-library-rtl.css +1 -1
  37. package/dist/plesk-ui-library-rtl.css.map +1 -1
  38. package/dist/plesk-ui-library.css +1 -1
  39. package/dist/plesk-ui-library.css.map +1 -1
  40. package/dist/plesk-ui-library.js +472 -725
  41. package/dist/plesk-ui-library.js.map +1 -1
  42. package/dist/plesk-ui-library.min.js +5 -5
  43. package/dist/plesk-ui-library.min.js.map +1 -1
  44. package/esm/components/ContentLoader/IconsLoader.js +1 -2
  45. package/esm/components/Dropdown/Dropdown.js +0 -2
  46. package/esm/components/Dropdown/index.js +2 -1
  47. package/esm/components/Figure/Figure.js +1 -33
  48. package/esm/components/Figure/index.js +2 -1
  49. package/esm/components/Form/Form.js +3 -3
  50. package/esm/components/Form/ScrollableElementFormContext.js +1 -1
  51. package/esm/components/Form/index.js +1 -0
  52. package/esm/components/FormFieldPassword/PasswordMeter.js +4 -4
  53. package/esm/components/Icon/constants.js +2 -2
  54. package/esm/components/Icon/images/symbols.svg +23 -1
  55. package/esm/components/Link/Link.js +11 -18
  56. package/esm/components/Overlay/Overlay.js +3 -4
  57. package/esm/components/Popper/Popper.js +14 -79
  58. package/esm/components/Popper/index.js +2 -1
  59. package/esm/components/Progress/Progress.js +8 -26
  60. package/esm/components/ProgressStep/ProgressStep.js +6 -48
  61. package/esm/components/ProgressStep/index.js +1 -2
  62. package/esm/components/Section/Section.js +1 -2
  63. package/esm/components/Skeleton/SkeletonText.js +1 -1
  64. package/esm/components/SplitButton/SplitButton.js +10 -47
  65. package/esm/components/SplitButton/index.js +2 -1
  66. package/esm/components/Switch/Switch.js +43 -116
  67. package/esm/components/Tooltip/Tooltip.js +36 -62
  68. package/esm/components/Translate/Translate.js +9 -73
  69. package/esm/components/Translate/index.js +2 -1
  70. package/esm/components/Translate/isLikeText.js +19 -0
  71. package/esm/components/utils.js +1 -1
  72. package/esm/index.js +1 -1
  73. package/esm/tests/index.js +3 -0
  74. package/esm/tests/renderer.js +19 -0
  75. package/package.json +19 -18
  76. package/styleguide/build/bundle.edc3f2a1.js +2 -0
  77. package/styleguide/images/symbols.svg +23 -1
  78. package/styleguide/index.html +2 -2
  79. package/types/src/components/ButtonGroup/ButtonGroup.d.ts +2 -2
  80. package/types/src/components/Dialog/Dialog.d.ts +29 -9
  81. package/types/src/components/Drawer/Drawer.d.ts +10 -12
  82. package/types/src/components/Drawer/DrawerProgress.d.ts +3 -3
  83. package/types/src/components/Dropdown/Dropdown.d.ts +3 -4
  84. package/types/src/components/Dropdown/index.d.ts +2 -0
  85. package/types/src/components/Figure/Figure.d.ts +28 -0
  86. package/types/src/components/Figure/index.d.ts +2 -0
  87. package/types/src/components/Form/Form.d.ts +8 -103
  88. package/types/src/components/Form/ScrollableElementFormContext.d.ts +2 -0
  89. package/types/src/components/Form/index.d.ts +1 -0
  90. package/types/src/components/Form/types.d.ts +5 -3
  91. package/types/src/components/Icon/constants.d.ts +1 -1
  92. package/types/src/components/ItemList/index.d.ts +1 -0
  93. package/types/src/components/Link/Link.d.ts +14 -12
  94. package/types/src/components/Link/index.d.ts +1 -0
  95. package/types/src/components/Overlay/Overlay.d.ts +1 -1
  96. package/types/src/components/Pagination/index.d.ts +1 -0
  97. package/types/src/components/Panel/index.d.ts +1 -0
  98. package/types/src/components/Popper/Popper.d.ts +96 -0
  99. package/types/src/components/Popper/index.d.ts +2 -0
  100. package/types/src/components/Progress/Progress.d.ts +49 -0
  101. package/types/src/components/Progress/index.d.ts +2 -0
  102. package/types/src/components/ProgressStep/ProgressStep.d.ts +69 -0
  103. package/types/src/components/ProgressStep/index.d.ts +2 -0
  104. package/types/src/components/SplitButton/SplitButton.d.ts +53 -0
  105. package/types/src/components/SplitButton/index.d.ts +2 -0
  106. package/types/src/components/Switch/Switch.d.ts +58 -0
  107. package/types/src/components/Switch/index.d.ts +2 -0
  108. package/types/src/components/TextArea/index.d.ts +1 -0
  109. package/types/src/components/Tooltip/Tooltip.d.ts +61 -0
  110. package/types/src/components/Tooltip/index.d.ts +2 -0
  111. package/types/src/components/Translate/Translate.d.ts +56 -0
  112. package/types/src/components/Translate/index.d.ts +3 -0
  113. package/types/src/components/Translate/isLikeText.d.ts +2 -0
  114. package/types/src/components/index.d.ts +11 -0
  115. package/types/src/components/utils.d.ts +6 -4
  116. package/types/src/tests/index.d.ts +1 -0
  117. package/types/src/tests/renderer.d.ts +23 -0
  118. package/styleguide/build/bundle.70f167a3.js +0 -2
  119. /package/styleguide/build/{bundle.70f167a3.js.LICENSE.txt → bundle.edc3f2a1.js.LICENSE.txt} +0 -0
@@ -0,0 +1,49 @@
1
+ import { Component, ReactNode } from 'react';
2
+ import { Status } from '../ProgressStep';
3
+ import '../../helpers/base.less';
4
+ import './Progress.less';
5
+ export interface ProgressProps {
6
+ /**
7
+ * Content of the `Progress`.
8
+ * @since 1.10.0
9
+ */
10
+ children: ReactNode;
11
+ /**
12
+ * On overall status event handler.
13
+ * @since 1.10.0
14
+ */
15
+ onStatusChange?: (status: Status) => void;
16
+ /**
17
+ * @ignore
18
+ */
19
+ className?: string;
20
+ /**
21
+ * @ignore
22
+ */
23
+ baseClassName?: string;
24
+ }
25
+ declare type ProgressState = {
26
+ status: Status | null;
27
+ };
28
+ /**
29
+ * `Progress` is used for showing progress of performing long operations.
30
+ * @since 1.10.0
31
+ */
32
+ declare class Progress extends Component<ProgressProps, ProgressState> {
33
+ static defaultProps: {
34
+ onStatusChange: null;
35
+ children: null;
36
+ className: null;
37
+ baseClassName: string;
38
+ };
39
+ state: {
40
+ status: null;
41
+ };
42
+ static getDerivedStateFromProps({ children }: ProgressProps): {
43
+ status: string;
44
+ };
45
+ componentDidMount(): void;
46
+ componentDidUpdate(_: ProgressProps, prevState: ProgressState): void;
47
+ render(): JSX.Element;
48
+ }
49
+ export default Progress;
@@ -0,0 +1,2 @@
1
+ export { default } from './Progress';
2
+ export type { ProgressProps } from './Progress';
@@ -0,0 +1,69 @@
1
+ import { ReactNode } from 'react';
2
+ import { IconName, IconProps } from '../Icon';
3
+ import '../../helpers/base.less';
4
+ import './ProgressStep.less';
5
+ export declare const STATUS_NOT_STARTED = "not_started";
6
+ export declare const STATUS_RUNNING = "running";
7
+ export declare const STATUS_DONE = "done";
8
+ export declare const STATUS_WARNING = "warning";
9
+ export declare const STATUS_ERROR = "error";
10
+ export declare const STATUS_CANCELED = "canceled";
11
+ export declare type Status = typeof STATUS_NOT_STARTED | typeof STATUS_RUNNING | typeof STATUS_DONE | typeof STATUS_ERROR | typeof STATUS_CANCELED | typeof STATUS_WARNING;
12
+ export interface ProgressStepProps {
13
+ /**
14
+ * Title of the step
15
+ * @since 1.10.0
16
+ */
17
+ title?: ReactNode;
18
+ /**
19
+ * Status for the step
20
+ * @since 1.10.0
21
+ */
22
+ status?: Status;
23
+ /**
24
+ * Name of icon or [Icon](#!/Icon) component
25
+ * @ignore
26
+ */
27
+ icon?: ReactNode | IconName | IconProps;
28
+ /**
29
+ * Text description for the status of the step
30
+ * @since 1.10.0
31
+ */
32
+ statusText?: ReactNode;
33
+ /**
34
+ * Progress indication in numbers
35
+ * @since 1.10.0
36
+ */
37
+ progress?: number;
38
+ /**
39
+ * Content of the `ProgressStep`.
40
+ * @since 1.10.0
41
+ */
42
+ children?: ReactNode;
43
+ /**
44
+ * @ignore
45
+ */
46
+ className?: string;
47
+ /**
48
+ * @ignore
49
+ */
50
+ baseClassName?: string;
51
+ }
52
+ /**
53
+ * `ProgressStep` is a part of the [Progress](#!/Progress) component.
54
+ * @since 1.10.0
55
+ */
56
+ declare const ProgressStep: {
57
+ ({ className, children, icon, title, statusText, progress, status, baseClassName, ...props }: ProgressStepProps): JSX.Element;
58
+ defaultProps: {
59
+ icon: null;
60
+ title: null;
61
+ status: string;
62
+ statusText: null;
63
+ progress: number;
64
+ children: null;
65
+ className: null;
66
+ baseClassName: string;
67
+ };
68
+ };
69
+ export default ProgressStep;
@@ -0,0 +1,2 @@
1
+ export type { Status, ProgressStepProps } from './ProgressStep';
2
+ export { default, STATUS_RUNNING, STATUS_DONE, STATUS_ERROR, STATUS_WARNING, STATUS_CANCELED, STATUS_NOT_STARTED, } from './ProgressStep';
@@ -0,0 +1,53 @@
1
+ import { ReactNode, KeyboardEventHandler } from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ import { DropdownProps } from '../Dropdown';
4
+ import './SplitButton.less';
5
+ export interface SplitButtonProps {
6
+ /**
7
+ * Dropdown [menu](#!/Menu)
8
+ * @type ReactElement
9
+ * @since 0.0.47
10
+ */
11
+ menu: DropdownProps['menu'];
12
+ /**
13
+ * Name of icon or [Icon](#!/Icon) component
14
+ * @type IconName | IconProps | ReactNode
15
+ * @since 3.35.0
16
+ */
17
+ icon?: ButtonProps['icon'];
18
+ /**
19
+ * Button size
20
+ * @since 3.35.0
21
+ */
22
+ size?: ButtonProps['size'];
23
+ /**
24
+ * Content of the button
25
+ * @since 0.0.40
26
+ */
27
+ children?: ReactNode;
28
+ /**
29
+ * @ignore
30
+ */
31
+ className?: string;
32
+ /**
33
+ * @ignore
34
+ */
35
+ baseClassName?: string;
36
+ /**
37
+ * @ignore
38
+ */
39
+ onKeyDown?: KeyboardEventHandler<HTMLDivElement>;
40
+ /**
41
+ * @ignore
42
+ */
43
+ onClick?: ButtonProps['onClick'];
44
+ }
45
+ /**
46
+ * `Split Button` is a combination of a standard [Button](#!/Button) with a [Dropdown](#!/Dropdown) menu.
47
+ * It is used for grouping several related actions when one of the actions should be accessible immediately
48
+ * because it is used more often than others.
49
+ *
50
+ * Since: 0.0.40
51
+ */
52
+ declare const SplitButton: ({ baseClassName, className, menu, children, onClick, onKeyDown, icon, size, ...props }: SplitButtonProps) => JSX.Element;
53
+ export default SplitButton;
@@ -0,0 +1,2 @@
1
+ export { default } from './SplitButton';
2
+ export * from './SplitButton';
@@ -0,0 +1,58 @@
1
+ import { ReactNode } from 'react';
2
+ import './Switch.less';
3
+ export interface SwitchProps {
4
+ /**
5
+ * Determine whether the `Switch` is checked.
6
+ * @since 0.0.42
7
+ */
8
+ checked?: boolean;
9
+ /**
10
+ * A callback function, can be executed when the checked state is changing.
11
+ * @since 0.0.42
12
+ */
13
+ onChange?: (checked: boolean) => void;
14
+ /**
15
+ * Tooltip for component
16
+ * @since 0.0.42
17
+ */
18
+ tooltip?: ReactNode;
19
+ /**
20
+ * Visual intent color to apply to component.
21
+ * @since 0.3.0
22
+ */
23
+ intent?: 'warning' | 'danger';
24
+ /**
25
+ * Is `Switch` disabled?
26
+ * @since 0.0.42
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * Loading indication
31
+ * @since 0.3.0
32
+ */
33
+ loading?: boolean;
34
+ /**
35
+ * Label of the `Switch`
36
+ * @since 0.0.42
37
+ */
38
+ children?: ReactNode;
39
+ /**
40
+ * @ignore
41
+ */
42
+ defaultChecked?: boolean;
43
+ /**
44
+ * @ignore
45
+ */
46
+ className?: string;
47
+ /**
48
+ * @ignore
49
+ */
50
+ baseClassName?: string;
51
+ }
52
+ /**
53
+ * `Switch` component is used for changing the state of an object or system preferences.
54
+ * It provides immediate results that is why it should not be used in Form.
55
+ * @since 0.0.42
56
+ */
57
+ declare const Switch: ({ className, children, onChange, tooltip, intent, checked, defaultChecked, baseClassName, disabled, loading, ...props }: SwitchProps) => JSX.Element;
58
+ export default Switch;
@@ -0,0 +1,2 @@
1
+ export { default } from './Switch';
2
+ export type { SwitchProps } from './Switch';
@@ -0,0 +1 @@
1
+ export { default } from './TextArea';
@@ -0,0 +1,61 @@
1
+ import { Component, CSSProperties, MouseEvent, ReactElement, ReactNode } from 'react';
2
+ import './Tooltip.less';
3
+ export interface TooltipProps {
4
+ /**
5
+ * Content of the tooltip
6
+ * @since 0.0.42
7
+ */
8
+ title: ReactNode;
9
+ /**
10
+ * Element with tooltip
11
+ * @since 0.0.42
12
+ */
13
+ children: ReactElement;
14
+ /**
15
+ * Show delay (ms)
16
+ * @since 0.0.50
17
+ */
18
+ delay?: number;
19
+ /**
20
+ * @ignore
21
+ */
22
+ style?: CSSProperties;
23
+ /**
24
+ * @ignore
25
+ */
26
+ className?: string;
27
+ /**
28
+ * @ignore
29
+ */
30
+ baseClassName?: string;
31
+ }
32
+ /**
33
+ * `Tooltip` component is used for providing information about an interface element
34
+ * while user hovers the pointer over the element.
35
+ * @since 0.0.35
36
+ */
37
+ declare class Tooltip extends Component<TooltipProps> {
38
+ static defaultProps: {
39
+ delay: number;
40
+ style: undefined;
41
+ className: undefined;
42
+ baseClassName: string;
43
+ };
44
+ state: {
45
+ left: number;
46
+ top: number;
47
+ ready: boolean;
48
+ visible: boolean;
49
+ };
50
+ componentWillUnmount(): void;
51
+ private timer;
52
+ private tooltipRef;
53
+ clearTimer: () => void;
54
+ handleShow: () => void;
55
+ handleHide: () => void;
56
+ handleMouseEnter: () => void;
57
+ handleMouseMove: (e: MouseEvent) => void;
58
+ renderTooltip(): JSX.Element;
59
+ render(): JSX.Element;
60
+ }
61
+ export default Tooltip;
@@ -0,0 +1,2 @@
1
+ export { default } from './Tooltip';
2
+ export type { TooltipProps } from './Tooltip';
@@ -0,0 +1,56 @@
1
+ import { ElementType, ReactNode } from 'react';
2
+ import { PolymorphicComponentProps } from '../../utils/types';
3
+ interface BaseTranslateProps {
4
+ /**
5
+ * A some prefix for the message key.
6
+ * @since 2.6.0
7
+ */
8
+ namespace?: string;
9
+ /**
10
+ * Translatable content or message key.
11
+ * @since 0.0.42
12
+ */
13
+ content?: string;
14
+ /**
15
+ * Message params
16
+ * @since 0.0.42
17
+ */
18
+ params?: {
19
+ [key: string]: ReactNode;
20
+ };
21
+ /**
22
+ * Fallback translation value.
23
+ * @since 0.0.47
24
+ */
25
+ fallback?: string;
26
+ /**
27
+ * A set of translation messages. If the set contains a message key, the component uses an item from the set for rendering.
28
+ * @ignore
29
+ */
30
+ translators?: {
31
+ [key: string]: ReactNode;
32
+ };
33
+ /**
34
+ * @ignore
35
+ */
36
+ unsafe?: boolean;
37
+ /**
38
+ * @ignore
39
+ */
40
+ children?: string;
41
+ }
42
+ export declare type TranslateProps<Component extends ElementType = 'span'> = {
43
+ /**
44
+ * Component to render as the root element. Useful when rendering a `Translate` as `<option>`.
45
+ * @since 0.0.42
46
+ * @type ElementType
47
+ * @default span
48
+ */
49
+ component?: Component;
50
+ } & PolymorphicComponentProps<Component, BaseTranslateProps>;
51
+ /**
52
+ * `Translate` component.
53
+ * @since 0.0.42
54
+ */
55
+ declare const Translate: <Component extends ElementType<any> = "span">({ component, content, children, params, unsafe, fallback, namespace, translators, ...props }: TranslateProps<Component>) => any;
56
+ export default Translate;
@@ -0,0 +1,3 @@
1
+ export { default } from './Translate';
2
+ export { isLikeText } from './isLikeText';
3
+ export type { TranslateProps } from './Translate';
@@ -0,0 +1,2 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const isLikeText: (node: ReactNode) => boolean;
@@ -22,14 +22,18 @@ export { default as ConsoleOutput } from './ConsoleOutput';
22
22
  export { default as ContentLoader } from './ContentLoader';
23
23
  export { default as Cuttable } from './Cuttable';
24
24
  export { default as Dialog } from './Dialog';
25
+ export type { DialogProps } from './Dialog';
25
26
  export { default as Drawer } from './Drawer';
26
27
  export type { DrawerProps } from './Drawer';
27
28
  export { default as Dropdown } from './Dropdown';
29
+ export type { DropdownProps } from './Dropdown';
28
30
  export { default as InPlaceEdit } from './InPlaceEdit';
29
31
  export { default as ExtendedStatusMessage } from './ExtendedStatusMessage';
30
32
  export * from './ExtendedStatusMessage';
31
33
  export { default as Figure } from './Figure';
34
+ export type { FigureProps } from './Figure';
32
35
  export { default as Form } from './Form';
36
+ export type { FormProps, FormValues, FormInstanceHandles } from './Form';
33
37
  export * from './Form';
34
38
  export { default as FormField } from './FormField';
35
39
  export { default as FormFieldCheckbox } from './FormFieldCheckbox';
@@ -72,21 +76,25 @@ export { default as Paragraph } from './Paragraph';
72
76
  export { default as Plaintext } from './Plaintext';
73
77
  export { default as Popover } from './Popover';
74
78
  export { default as Progress } from './Progress';
79
+ export type { ProgressProps } from './Progress';
75
80
  export { default as ProgressBar } from './ProgressBar';
76
81
  export { default as ProgressDialog } from './ProgressDialog';
77
82
  export { default as ProgressDialogStep } from './ProgressDialogStep';
78
83
  export { default as ProgressStep } from './ProgressStep';
84
+ export type { ProgressStepProps } from './ProgressStep';
79
85
  export { default as Rating } from './Rating';
80
86
  export { default as Section } from './Section';
81
87
  export * from './Section';
82
88
  export { default as SegmentedControl } from './SegmentedControl';
83
89
  export { default as Spot } from './Spot';
84
90
  export { default as SplitButton } from './SplitButton';
91
+ export type { SplitButtonProps } from './SplitButton';
85
92
  export { default as Status } from './Status';
86
93
  export { default as StatusMessage } from './StatusMessage';
87
94
  export { default as Subnav } from './Subnav';
88
95
  export * from './Subnav';
89
96
  export { default as Switch } from './Switch';
97
+ export type { SwitchProps } from './Switch';
90
98
  export { default as SwitchesPanel } from './SwitchesPanel';
91
99
  export { default as SwitchesPanelItem } from './SwitchesPanelItem';
92
100
  export { default as Tabs } from './Tabs';
@@ -96,9 +104,12 @@ export { default as Toaster } from './Toaster';
96
104
  export { default as Toolbar } from './Toolbar';
97
105
  export * from './Toolbar';
98
106
  export { default as Tooltip } from './Tooltip';
107
+ export type { TooltipProps } from './Tooltip';
99
108
  export { default as Tour } from './Tour';
100
109
  export { default as Translate } from './Translate';
110
+ export type { TranslateProps } from './Translate';
101
111
  export { default as Link } from './Link';
112
+ export type { LinkProps } from './Link';
102
113
  export { default as Skeleton } from './Skeleton';
103
114
  export * from './Skeleton';
104
115
  export { PortalContext } from './Layer';
@@ -13,12 +13,14 @@ export declare class EventEmitter<H = (...args: any[]) => void> {
13
13
  on(type: string, handler: H): void;
14
14
  emit(type: string, ...args: any[]): void;
15
15
  }
16
- export declare const createFocusManager: (containerRef: RefObject<HTMLElement>, isFitForFocus?: (_node: Element) => boolean, strategy?: {
17
- getNext: (container: Element, element: Element | null) => Element | undefined;
18
- getPrev: (container: Element, element: Element | null) => Element | undefined;
16
+ export declare type FocusStrategy = {
17
+ getNext: (container: Element, element: Element | null) => Element | null | undefined;
18
+ getPrev: (container: Element, element: Element | null) => Element | null | undefined;
19
19
  getFirst: (container: Element) => Element | null;
20
20
  getLast: (container: Element) => Element | null;
21
- }) => {
21
+ };
22
+ declare type ElementFitForFocusChecker = (node: Element) => boolean;
23
+ export declare const createFocusManager: (containerRef: RefObject<HTMLElement>, isFitForFocus?: ElementFitForFocusChecker, strategy?: FocusStrategy) => {
22
24
  focusNext: (element?: Element | null, attempt?: number) => boolean;
23
25
  focusPrev: (element?: Element | null, attempt?: number) => boolean;
24
26
  focusFirst: (attempt?: number) => boolean;
@@ -0,0 +1 @@
1
+ export { default } from './renderer';
@@ -0,0 +1,23 @@
1
+ import { ComponentProps, ElementType } from 'react';
2
+ declare const renderer: <C extends ElementType<any>>(Component: C, baseProps?: ComponentProps<C> | undefined) => (propOverrides?: Partial<ComponentProps<C>> | undefined) => {
3
+ asFragment: () => DocumentFragment;
4
+ user: {
5
+ clear: (element: import("@testing-library/user-event").TargetElement) => void;
6
+ click: (element: import("@testing-library/user-event").TargetElement, init?: MouseEventInit | undefined, options?: import("@testing-library/user-event").IClickOptions | undefined) => void;
7
+ dblClick: (element: import("@testing-library/user-event").TargetElement, init?: MouseEventInit | undefined, options?: import("@testing-library/user-event").IClickOptions | undefined) => void;
8
+ selectOptions: (element: import("@testing-library/user-event").TargetElement, values: string | string[] | HTMLElement | HTMLElement[], init?: MouseEventInit | undefined) => void;
9
+ deselectOptions: (element: import("@testing-library/user-event").TargetElement, values: string | string[] | HTMLElement | HTMLElement[], init?: MouseEventInit | undefined) => void;
10
+ upload: (element: import("@testing-library/user-event").TargetElement, files: import("@testing-library/user-event").FilesArgument, init?: import("@testing-library/user-event").UploadInitArgument | undefined, options?: import("@testing-library/user-event").IUploadOptions | undefined) => void;
11
+ type: <T extends import("@testing-library/user-event").ITypeOpts>(element: import("@testing-library/user-event").TargetElement, text: string, userOpts?: T | undefined) => T extends {
12
+ delay: number;
13
+ } ? Promise<void> : void;
14
+ tab: (userOpts?: import("@testing-library/user-event").ITabUserOptions | undefined) => void;
15
+ paste: (element: import("@testing-library/user-event").TargetElement, text: string, init?: MouseEventInit | undefined, pasteOptions?: {
16
+ initialSelectionStart?: number | undefined;
17
+ initialSelectionEnd?: number | undefined;
18
+ } | undefined) => void;
19
+ hover: (element: import("@testing-library/user-event").TargetElement, init?: MouseEventInit | undefined) => void;
20
+ unhover: (element: import("@testing-library/user-event").TargetElement, init?: MouseEventInit | undefined) => void;
21
+ };
22
+ };
23
+ export default renderer;