carbon-react 106.6.2 → 106.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__spec_helper__/expect.d.ts +8 -1
- package/esm/__spec_helper__/expect.js +1 -5
- package/esm/__spec_helper__/test-utils.d.ts +71 -33
- package/esm/__spec_helper__/test-utils.js +63 -65
- package/esm/components/action-popover/action-popover-context.d.ts +7 -2
- package/esm/components/action-popover/action-popover-context.js +1 -1
- package/esm/components/action-popover/action-popover-divider/action-popover-divider.component.d.ts +1 -1
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.d.ts +28 -41
- package/esm/components/action-popover/action-popover-item/action-popover-item.component.js +99 -118
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +35 -2
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.component.js +42 -53
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.d.ts +20 -18
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +13 -5
- package/esm/components/action-popover/action-popover-test.stories.js +76 -0
- package/esm/components/action-popover/action-popover.component.d.ts +30 -53
- package/esm/components/action-popover/action-popover.component.js +205 -67
- package/esm/components/action-popover/action-popover.style.d.ts +17 -11
- package/esm/components/action-popover/action-popover.style.js +20 -26
- package/esm/components/action-popover/index.d.ts +9 -5
- package/esm/components/button-bar/button-bar-test.stories.js +122 -0
- package/esm/components/button-bar/button-bar.component.d.ts +12 -15
- package/esm/components/button-bar/button-bar.component.js +331 -33
- package/esm/components/button-bar/button-bar.config.d.ts +2 -2
- package/esm/components/button-bar/button-bar.style.d.ts +4 -4
- package/esm/components/button-bar/button-bar.style.js +18 -33
- package/esm/components/button-bar/index.d.ts +2 -1
- package/esm/components/heading/heading.component.d.ts +7 -47
- package/esm/components/heading/heading.component.js +1 -48
- package/esm/components/link/link.component.js +1 -5
- package/esm/components/menu/__internal__/spec-helper/index.js +2 -1
- package/esm/components/menu/__internal__/submenu/submenu.component.js +21 -4
- package/esm/components/menu/menu.component.js +2 -1
- package/esm/components/menu/scrollable-block/scrollable-block.component.js +4 -2
- package/esm/components/modal/modal.component.js +3 -60
- package/esm/components/toast/toast.component.js +3 -13
- package/esm/hooks/__internal__/useModalManager/index.d.ts +1 -0
- package/esm/hooks/__internal__/useModalManager/index.js +1 -0
- package/esm/hooks/__internal__/useModalManager/useModalManager.d.ts +3 -0
- package/esm/hooks/__internal__/useModalManager/useModalManager.js +66 -0
- package/lib/__spec_helper__/expect.d.ts +8 -1
- package/lib/__spec_helper__/expect.js +2 -4
- package/lib/__spec_helper__/test-utils.d.ts +71 -33
- package/lib/__spec_helper__/test-utils.js +63 -65
- package/lib/components/action-popover/action-popover-context.d.ts +7 -2
- package/lib/components/action-popover/action-popover-context.js +1 -1
- package/lib/components/action-popover/action-popover-divider/action-popover-divider.component.d.ts +1 -1
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.d.ts +28 -41
- package/lib/components/action-popover/action-popover-item/action-popover-item.component.js +100 -119
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.d.ts +35 -2
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.component.js +44 -55
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.d.ts +20 -18
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.component.js +13 -5
- package/lib/components/action-popover/action-popover-test.stories.js +95 -0
- package/lib/components/action-popover/action-popover.component.d.ts +30 -53
- package/lib/components/action-popover/action-popover.component.js +206 -71
- package/lib/components/action-popover/action-popover.style.d.ts +17 -11
- package/lib/components/action-popover/action-popover.style.js +21 -28
- package/lib/components/action-popover/index.d.ts +9 -5
- package/lib/components/button-bar/button-bar-test.stories.js +145 -0
- package/lib/components/button-bar/button-bar.component.d.ts +12 -15
- package/lib/components/button-bar/button-bar.component.js +336 -35
- package/lib/components/button-bar/button-bar.config.d.ts +2 -2
- package/lib/components/button-bar/button-bar.style.d.ts +4 -4
- package/lib/components/button-bar/button-bar.style.js +18 -35
- package/lib/components/button-bar/index.d.ts +2 -1
- package/lib/components/heading/heading.component.d.ts +7 -47
- package/lib/components/heading/heading.component.js +1 -48
- package/lib/components/link/link.component.js +1 -5
- package/lib/components/menu/__internal__/spec-helper/index.js +2 -1
- package/lib/components/menu/__internal__/submenu/submenu.component.js +21 -4
- package/lib/components/menu/menu.component.js +2 -1
- package/lib/components/menu/scrollable-block/scrollable-block.component.js +4 -2
- package/lib/components/modal/modal.component.js +3 -62
- package/lib/components/toast/toast.component.js +4 -17
- package/lib/hooks/__internal__/useModalManager/index.d.ts +1 -0
- package/lib/hooks/__internal__/useModalManager/index.js +15 -0
- package/lib/hooks/__internal__/useModalManager/package.json +6 -0
- package/lib/hooks/__internal__/useModalManager/useModalManager.d.ts +3 -0
- package/lib/hooks/__internal__/useModalManager/useModalManager.js +79 -0
- package/package.json +5 -1
- package/esm/components/action-popover/action-popover-divider/action-popover-divider.d.ts +0 -12
- package/esm/components/action-popover/action-popover-item/action-popover-item.d.ts +0 -26
- package/esm/components/action-popover/action-popover-menu/action-popover-menu.d.ts +0 -33
- package/esm/components/action-popover/action-popover-menu-button/action-popover-menu-button.d.ts +0 -13
- package/esm/components/action-popover/action-popover.d.ts +0 -39
- package/esm/components/button-bar/button-bar.d.ts +0 -24
- package/lib/components/action-popover/action-popover-divider/action-popover-divider.d.ts +0 -12
- package/lib/components/action-popover/action-popover-item/action-popover-item.d.ts +0 -26
- package/lib/components/action-popover/action-popover-menu/action-popover-menu.d.ts +0 -33
- package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.d.ts +0 -13
- package/lib/components/action-popover/action-popover.d.ts +0 -39
- package/lib/components/button-bar/button-bar.d.ts +0 -24
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { IconType } from "components/icon/icon";
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
import { ActionPopoverMenuProps } from "../action-popover-menu/action-popover-menu";
|
|
4
|
-
|
|
5
|
-
export interface ActionPopoverItemProps {
|
|
6
|
-
/** The text label to display for this Item */
|
|
7
|
-
children: string;
|
|
8
|
-
/** Flag to indicate if item is disabled */
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
/** allows to provide download prop that works dependent with href */
|
|
11
|
-
download?: boolean;
|
|
12
|
-
/** allows to provide href prop */
|
|
13
|
-
href?: string;
|
|
14
|
-
/** The name of the icon to display next to the label */
|
|
15
|
-
icon?: IconType;
|
|
16
|
-
/** Callback to run when item is clicked */
|
|
17
|
-
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
18
|
-
/** Submenu component for item */
|
|
19
|
-
submenu?: React.ReactElement<ActionPopoverMenuProps>;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare function MenuItem(props: ActionPopoverItemProps): JSX.Element;
|
|
23
|
-
declare function ActionPopoverItem(props: ActionPopoverItemProps): JSX.Element;
|
|
24
|
-
|
|
25
|
-
export { MenuItem };
|
|
26
|
-
export default ActionPopoverItem;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import ActionPopoverDivider from "../action-popover-divider/action-popover-divider";
|
|
3
|
-
import { ActionPopoverItemProps } from "../action-popover-item/action-popover-item";
|
|
4
|
-
|
|
5
|
-
type ActionPopoverChild =
|
|
6
|
-
| React.ReactElement<ActionPopoverItemProps>
|
|
7
|
-
| typeof ActionPopoverDivider
|
|
8
|
-
| boolean
|
|
9
|
-
| null
|
|
10
|
-
| undefined;
|
|
11
|
-
|
|
12
|
-
export interface ActionPopoverMenuProps {
|
|
13
|
-
/** Children for the menu */
|
|
14
|
-
children?: ActionPopoverChild | ActionPopoverChild[];
|
|
15
|
-
/** Index to control which item is focused */
|
|
16
|
-
focusIndex?: number;
|
|
17
|
-
/** Flag to indicate whether a menu should open */
|
|
18
|
-
isOpen?: boolean;
|
|
19
|
-
/** A unique ID for the menu */
|
|
20
|
-
menuID?: string;
|
|
21
|
-
/** Callback to set the index of the focused item */
|
|
22
|
-
setFocusIndex?: (args: number) => any;
|
|
23
|
-
/** Callback to set the isOpen flag */
|
|
24
|
-
setOpen?: (args: boolean) => any;
|
|
25
|
-
/** Unique ID for the menu's parent */
|
|
26
|
-
parentID?: string;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
declare function ActionPopoverMenu(
|
|
30
|
-
props: ActionPopoverMenuProps & React.RefAttributes<HTMLDivElement>
|
|
31
|
-
): JSX.Element;
|
|
32
|
-
|
|
33
|
-
export default ActionPopoverMenu;
|
package/lib/components/action-popover/action-popover-menu-button/action-popover-menu-button.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface ActionPopoverMenuButtonProps {
|
|
2
|
-
children?: string;
|
|
3
|
-
buttonType?: string;
|
|
4
|
-
iconType?: string;
|
|
5
|
-
iconPosition?: string;
|
|
6
|
-
size?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
declare function ActionPopoverMenuButton(
|
|
10
|
-
props: ActionPopoverMenuButtonProps
|
|
11
|
-
): JSX.Element;
|
|
12
|
-
|
|
13
|
-
export default ActionPopoverMenuButton;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
import ActionPopoverDivider from "./action-popover-divider/action-popover-divider";
|
|
4
|
-
import { ActionPopoverItemProps } from "./action-popover-item/action-popover-item";
|
|
5
|
-
|
|
6
|
-
export interface RenderButtonProps {
|
|
7
|
-
tabIndex: number;
|
|
8
|
-
"data-element": string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
type ActionPopoverChild =
|
|
12
|
-
| React.ReactElement<ActionPopoverItemProps>
|
|
13
|
-
| typeof ActionPopoverDivider
|
|
14
|
-
| boolean
|
|
15
|
-
| null
|
|
16
|
-
| undefined;
|
|
17
|
-
|
|
18
|
-
export interface ActionPopoverProps extends MarginProps {
|
|
19
|
-
/** Children for popover component */
|
|
20
|
-
children?: ActionPopoverChild | ActionPopoverChild[];
|
|
21
|
-
/** Horizontal alignment of menu items content */
|
|
22
|
-
horizontalAlignment?: "left" | "right";
|
|
23
|
-
/** Unique ID */
|
|
24
|
-
id?: string;
|
|
25
|
-
/** Callback to be called on menu open */
|
|
26
|
-
onOpen?: () => void;
|
|
27
|
-
/** Callback to be called on menu close */
|
|
28
|
-
onClose?: () => void;
|
|
29
|
-
/** Set whether the menu should open above or below the button */
|
|
30
|
-
placement?: "bottom" | "top";
|
|
31
|
-
/** Render a custom menu button to override default ellipsis icon */
|
|
32
|
-
renderButton?: (buttonProps: RenderButtonProps) => React.ReactNode;
|
|
33
|
-
/** Boolean to control whether menu should align to right */
|
|
34
|
-
rightAlignMenu?: boolean;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare function ActionPopover(props: ActionPopoverProps): JSX.Element;
|
|
38
|
-
|
|
39
|
-
export default ActionPopover;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import Button from "components/button/button";
|
|
2
|
-
import IconButton from "components/icon-button";
|
|
3
|
-
import { SpaceProps } from "styled-system";
|
|
4
|
-
|
|
5
|
-
type ButtonBarChild =
|
|
6
|
-
| typeof Button
|
|
7
|
-
| typeof IconButton
|
|
8
|
-
| boolean
|
|
9
|
-
| null
|
|
10
|
-
| undefined;
|
|
11
|
-
|
|
12
|
-
export interface ButtonBarProps extends SpaceProps {
|
|
13
|
-
children: ButtonBarChild | ButtonBarChild[];
|
|
14
|
-
/** Apply fullWidth style to the button bar */
|
|
15
|
-
fullWidth?: boolean;
|
|
16
|
-
/** Defines an Icon position for buttons: "before" | "after" */
|
|
17
|
-
iconPosition?: "before" | "after";
|
|
18
|
-
/** Assigns a size to the buttons: "small" | "medium" | "large" */
|
|
19
|
-
size?: "small" | "medium" | "large";
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare function ButtonBar(props: ButtonBarProps): JSX.Element;
|
|
23
|
-
|
|
24
|
-
export default ButtonBar;
|