carbon-react 106.6.1 → 106.6.4
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/box/box.component.d.ts +12 -1
- package/esm/components/box/box.component.js +12 -23
- package/esm/components/box/box.config.d.ts +10 -12
- package/esm/components/box/index.d.ts +2 -1
- 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/dismissible-box/dismissible-box.style.d.ts +1 -2
- package/esm/components/drawer/drawer.style.d.ts +1 -2
- package/esm/components/duelling-picklist/picklist/picklist.style.d.ts +2 -3
- package/esm/components/flat-table/flat-table.style.d.ts +1 -2
- package/esm/components/form/form.component.js +2 -1
- 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/box/box.component.d.ts +12 -1
- package/lib/components/box/box.component.js +13 -26
- package/lib/components/box/box.config.d.ts +10 -12
- package/lib/components/box/index.d.ts +2 -1
- 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/dismissible-box/dismissible-box.style.d.ts +1 -2
- package/lib/components/drawer/drawer.style.d.ts +1 -2
- package/lib/components/duelling-picklist/picklist/picklist.style.d.ts +2 -3
- package/lib/components/flat-table/flat-table.style.d.ts +1 -2
- package/lib/components/form/form.component.js +2 -1
- 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/box/box.d.ts +0 -31
- 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/box/box.d.ts +0 -31
- package/lib/components/button-bar/button-bar.d.ts +0 -24
|
@@ -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,31 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { StyledComponentProps } from "styled-components";
|
|
3
|
-
import {
|
|
4
|
-
ColorProps,
|
|
5
|
-
FlexboxProps,
|
|
6
|
-
LayoutProps,
|
|
7
|
-
SpaceProps,
|
|
8
|
-
} from "styled-system";
|
|
9
|
-
|
|
10
|
-
export interface BoxProps
|
|
11
|
-
extends SpaceProps,
|
|
12
|
-
ColorProps,
|
|
13
|
-
LayoutProps,
|
|
14
|
-
FlexboxProps {
|
|
15
|
-
as?: keyof JSX.IntrinsicElements | React.ComponentType<any>;
|
|
16
|
-
overflowWrap?: "break-word" | "anywhere";
|
|
17
|
-
scrollVariant?: "light" | "dark";
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* HTML color prop have to be removed from the StyledComponentProps
|
|
22
|
-
* as it's type conflicts with StyledSystem color prop
|
|
23
|
-
*/
|
|
24
|
-
type PropsWithoutColor = Omit<
|
|
25
|
-
StyledComponentProps<"div", Record<string, unknown>, BoxProps, "">,
|
|
26
|
-
"color"
|
|
27
|
-
>;
|
|
28
|
-
|
|
29
|
-
declare function Box(attrs: PropsWithoutColor & ColorProps): JSX.Element;
|
|
30
|
-
|
|
31
|
-
export default Box;
|
|
@@ -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;
|