carbon-react 109.3.3 → 109.3.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/__internal__/fieldset/fieldset.component.d.ts +25 -0
- package/esm/__internal__/fieldset/fieldset.component.js +167 -50
- package/esm/__internal__/fieldset/fieldset.style.d.ts +13 -0
- package/esm/__internal__/fieldset/fieldset.style.js +0 -10
- package/esm/__internal__/fieldset/index.d.ts +2 -1
- package/esm/__internal__/popover/index.d.ts +2 -1
- package/esm/__internal__/popover/popover.component.d.ts +18 -0
- package/esm/__internal__/popover/popover.component.js +23 -21
- package/esm/__internal__/popover/popover.style.d.ts +2 -0
- package/esm/components/button/button.component.d.ts +2 -0
- package/esm/components/button/button.component.js +2 -0
- package/esm/components/multi-action-button/multi-action-button.component.js +1 -0
- package/esm/components/pager/pager.component.js +1 -1
- package/esm/components/pager/pager.style.js +1 -1
- package/esm/components/split-button/index.d.ts +2 -2
- package/esm/components/split-button/split-button-children.style.d.ts +8 -0
- package/esm/components/split-button/split-button-children.style.js +3 -4
- package/esm/components/split-button/split-button-toggle.style.d.ts +10 -0
- package/esm/components/split-button/split-button.component.d.ts +29 -0
- package/esm/components/split-button/split-button.component.js +534 -87
- package/esm/components/split-button/split-button.config.d.ts +4 -0
- package/esm/components/split-button/split-button.style.d.ts +2 -0
- package/lib/__internal__/fieldset/fieldset.component.d.ts +25 -0
- package/lib/__internal__/fieldset/fieldset.component.js +167 -53
- package/lib/__internal__/fieldset/fieldset.style.d.ts +13 -0
- package/lib/__internal__/fieldset/fieldset.style.js +1 -12
- package/lib/__internal__/fieldset/index.d.ts +2 -1
- package/lib/__internal__/popover/index.d.ts +2 -1
- package/lib/__internal__/popover/popover.component.d.ts +18 -0
- package/lib/__internal__/popover/popover.component.js +24 -22
- package/lib/__internal__/popover/popover.style.d.ts +2 -0
- package/lib/components/button/button.component.d.ts +2 -0
- package/lib/components/button/button.component.js +2 -0
- package/lib/components/multi-action-button/multi-action-button.component.js +1 -0
- package/lib/components/pager/pager.component.js +1 -1
- package/lib/components/pager/pager.style.js +1 -1
- package/lib/components/split-button/index.d.ts +2 -2
- package/lib/components/split-button/split-button-children.style.d.ts +8 -0
- package/lib/components/split-button/split-button-children.style.js +3 -4
- package/lib/components/split-button/split-button-toggle.style.d.ts +10 -0
- package/lib/components/split-button/split-button.component.d.ts +29 -0
- package/lib/components/split-button/split-button.component.js +535 -89
- package/lib/components/split-button/split-button.config.d.ts +4 -0
- package/lib/components/split-button/split-button.style.d.ts +2 -0
- package/package.json +1 -1
- package/esm/__internal__/fieldset/fieldset.d.ts +0 -37
- package/esm/__internal__/popover/popover.d.ts +0 -46
- package/esm/components/split-button/split-button.d.ts +0 -29
- package/lib/__internal__/fieldset/fieldset.d.ts +0 -37
- package/lib/__internal__/popover/popover.d.ts +0 -46
- package/lib/components/split-button/split-button.d.ts +0 -29
package/package.json
CHANGED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
|
|
4
|
-
export interface FieldsetProps extends MarginProps {
|
|
5
|
-
/** Fieldset content */
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/** The content for the Fieldset Legend */
|
|
8
|
-
legend?: string;
|
|
9
|
-
/* Indicate that error has occurred
|
|
10
|
-
Pass string to display icon, tooltip and red border
|
|
11
|
-
Pass true boolean to only display red border */
|
|
12
|
-
error?: boolean | string;
|
|
13
|
-
/* Indicate that warning has occurred
|
|
14
|
-
Pass string to display icon, tooltip and orange border
|
|
15
|
-
Pass true boolean to only display orange border */
|
|
16
|
-
warning?: boolean | string;
|
|
17
|
-
/* Indicate additional information
|
|
18
|
-
Pass string to display icon, tooltip and blue border
|
|
19
|
-
Pass true boolean to only display blue border */
|
|
20
|
-
info?: boolean | string;
|
|
21
|
-
/** When true, legend is placed in line with the children */
|
|
22
|
-
inline?: boolean;
|
|
23
|
-
/** Percentage width of legend (only when legend is inline) */
|
|
24
|
-
legendWidth?: number;
|
|
25
|
-
/** Text alignment of legend when inline */
|
|
26
|
-
legendAlign?: "left" | "right";
|
|
27
|
-
/** Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */
|
|
28
|
-
legendSpacing?: 1 | 2;
|
|
29
|
-
/** If true, an asterisk will be added to the label */
|
|
30
|
-
isRequired?: boolean;
|
|
31
|
-
/** Controls whether group behaviour should be enabled */
|
|
32
|
-
blockGroupBehaviour?: boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
declare function Fieldset(props: FieldsetProps): JSX.Element;
|
|
36
|
-
|
|
37
|
-
export default Fieldset;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { State } from "@popperjs/core";
|
|
3
|
-
|
|
4
|
-
type PopoverModifier = {
|
|
5
|
-
name: string;
|
|
6
|
-
options?: Record<string, unknown>;
|
|
7
|
-
enabled?: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export interface PopoverPropTypes {
|
|
11
|
-
// Element to be positioned, has to be a single node and has to accept `ref` and `style` props
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
// Placement of children in relation to the reference element
|
|
14
|
-
placement?:
|
|
15
|
-
| "auto"
|
|
16
|
-
| "auto-start"
|
|
17
|
-
| "auto-end"
|
|
18
|
-
| "top"
|
|
19
|
-
| "top-start"
|
|
20
|
-
| "top-end"
|
|
21
|
-
| "bottom"
|
|
22
|
-
| "bottom-start"
|
|
23
|
-
| "bottom-end"
|
|
24
|
-
| "right"
|
|
25
|
-
| "right-start"
|
|
26
|
-
| "right-end"
|
|
27
|
-
| "left"
|
|
28
|
-
| "left-start"
|
|
29
|
-
| "left-end";
|
|
30
|
-
// Disables interaction with background UI
|
|
31
|
-
disableBackgroundUI?: boolean;
|
|
32
|
-
// Optional modifiers array, for more information and object structure go to:
|
|
33
|
-
// https://popper.js.org/docs/v2/constructors/#modifiers
|
|
34
|
-
modifiers?: PopoverModifier[];
|
|
35
|
-
// Optional onFirstUpdate function, for more information go to:
|
|
36
|
-
// hhttps://popper.js.org/docs/v2/lifecycle/#hook-into-the-lifecycle
|
|
37
|
-
onFirstUpdate?: (state: State) => void;
|
|
38
|
-
// When true, children are not rendered in portal
|
|
39
|
-
disablePortal?: boolean;
|
|
40
|
-
// Reference element, children will be positioned in relation to this element - should be a ref
|
|
41
|
-
reference?: React.RefObject<HTMLElement>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
declare function Popover(props: PopoverPropTypes): JSX.Element;
|
|
45
|
-
|
|
46
|
-
export default Popover;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
|
|
4
|
-
export interface SplitButtonProps
|
|
5
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
6
|
-
MarginProps {
|
|
7
|
-
/** Set align of the rendered content */
|
|
8
|
-
align?: "left" | "right";
|
|
9
|
-
/** Button type: "primary" | "secondary" */
|
|
10
|
-
buttonType?: "primary" | "secondary";
|
|
11
|
-
/** The additional button to display. */
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
/** A custom value for the data-element attribute */
|
|
14
|
-
"data-element"?: string;
|
|
15
|
-
/** A custom value for the data-role attribute */
|
|
16
|
-
"data-role"?: string;
|
|
17
|
-
/** Gives the button a disabled state. */
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/** Defines an Icon position within the button: "before" | "after" */
|
|
20
|
-
iconPosition?: "before" | "after";
|
|
21
|
-
/** The size of the buttons in the SplitButton. */
|
|
22
|
-
size?: "small" | "medium" | "large";
|
|
23
|
-
/** The text to be displayed in the SplitButton. */
|
|
24
|
-
text: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare function SplitButton(props: SplitButtonProps): JSX.Element;
|
|
28
|
-
|
|
29
|
-
export default SplitButton;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
|
|
4
|
-
export interface FieldsetProps extends MarginProps {
|
|
5
|
-
/** Fieldset content */
|
|
6
|
-
children: React.ReactNode;
|
|
7
|
-
/** The content for the Fieldset Legend */
|
|
8
|
-
legend?: string;
|
|
9
|
-
/* Indicate that error has occurred
|
|
10
|
-
Pass string to display icon, tooltip and red border
|
|
11
|
-
Pass true boolean to only display red border */
|
|
12
|
-
error?: boolean | string;
|
|
13
|
-
/* Indicate that warning has occurred
|
|
14
|
-
Pass string to display icon, tooltip and orange border
|
|
15
|
-
Pass true boolean to only display orange border */
|
|
16
|
-
warning?: boolean | string;
|
|
17
|
-
/* Indicate additional information
|
|
18
|
-
Pass string to display icon, tooltip and blue border
|
|
19
|
-
Pass true boolean to only display blue border */
|
|
20
|
-
info?: boolean | string;
|
|
21
|
-
/** When true, legend is placed in line with the children */
|
|
22
|
-
inline?: boolean;
|
|
23
|
-
/** Percentage width of legend (only when legend is inline) */
|
|
24
|
-
legendWidth?: number;
|
|
25
|
-
/** Text alignment of legend when inline */
|
|
26
|
-
legendAlign?: "left" | "right";
|
|
27
|
-
/** Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */
|
|
28
|
-
legendSpacing?: 1 | 2;
|
|
29
|
-
/** If true, an asterisk will be added to the label */
|
|
30
|
-
isRequired?: boolean;
|
|
31
|
-
/** Controls whether group behaviour should be enabled */
|
|
32
|
-
blockGroupBehaviour?: boolean;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
declare function Fieldset(props: FieldsetProps): JSX.Element;
|
|
36
|
-
|
|
37
|
-
export default Fieldset;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { State } from "@popperjs/core";
|
|
3
|
-
|
|
4
|
-
type PopoverModifier = {
|
|
5
|
-
name: string;
|
|
6
|
-
options?: Record<string, unknown>;
|
|
7
|
-
enabled?: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export interface PopoverPropTypes {
|
|
11
|
-
// Element to be positioned, has to be a single node and has to accept `ref` and `style` props
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
// Placement of children in relation to the reference element
|
|
14
|
-
placement?:
|
|
15
|
-
| "auto"
|
|
16
|
-
| "auto-start"
|
|
17
|
-
| "auto-end"
|
|
18
|
-
| "top"
|
|
19
|
-
| "top-start"
|
|
20
|
-
| "top-end"
|
|
21
|
-
| "bottom"
|
|
22
|
-
| "bottom-start"
|
|
23
|
-
| "bottom-end"
|
|
24
|
-
| "right"
|
|
25
|
-
| "right-start"
|
|
26
|
-
| "right-end"
|
|
27
|
-
| "left"
|
|
28
|
-
| "left-start"
|
|
29
|
-
| "left-end";
|
|
30
|
-
// Disables interaction with background UI
|
|
31
|
-
disableBackgroundUI?: boolean;
|
|
32
|
-
// Optional modifiers array, for more information and object structure go to:
|
|
33
|
-
// https://popper.js.org/docs/v2/constructors/#modifiers
|
|
34
|
-
modifiers?: PopoverModifier[];
|
|
35
|
-
// Optional onFirstUpdate function, for more information go to:
|
|
36
|
-
// hhttps://popper.js.org/docs/v2/lifecycle/#hook-into-the-lifecycle
|
|
37
|
-
onFirstUpdate?: (state: State) => void;
|
|
38
|
-
// When true, children are not rendered in portal
|
|
39
|
-
disablePortal?: boolean;
|
|
40
|
-
// Reference element, children will be positioned in relation to this element - should be a ref
|
|
41
|
-
reference?: React.RefObject<HTMLElement>;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
declare function Popover(props: PopoverPropTypes): JSX.Element;
|
|
45
|
-
|
|
46
|
-
export default Popover;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { MarginProps } from "styled-system";
|
|
3
|
-
|
|
4
|
-
export interface SplitButtonProps
|
|
5
|
-
extends React.ButtonHTMLAttributes<HTMLButtonElement>,
|
|
6
|
-
MarginProps {
|
|
7
|
-
/** Set align of the rendered content */
|
|
8
|
-
align?: "left" | "right";
|
|
9
|
-
/** Button type: "primary" | "secondary" */
|
|
10
|
-
buttonType?: "primary" | "secondary";
|
|
11
|
-
/** The additional button to display. */
|
|
12
|
-
children: React.ReactNode;
|
|
13
|
-
/** A custom value for the data-element attribute */
|
|
14
|
-
"data-element"?: string;
|
|
15
|
-
/** A custom value for the data-role attribute */
|
|
16
|
-
"data-role"?: string;
|
|
17
|
-
/** Gives the button a disabled state. */
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
/** Defines an Icon position within the button: "before" | "after" */
|
|
20
|
-
iconPosition?: "before" | "after";
|
|
21
|
-
/** The size of the buttons in the SplitButton. */
|
|
22
|
-
size?: "small" | "medium" | "large";
|
|
23
|
-
/** The text to be displayed in the SplitButton. */
|
|
24
|
-
text: string;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
declare function SplitButton(props: SplitButtonProps): JSX.Element;
|
|
28
|
-
|
|
29
|
-
export default SplitButton;
|