carbon-react 106.0.0 → 106.0.3
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__/input/index.d.ts +5 -5
- package/esm/__internal__/input/input-presentation.component.d.ts +21 -27
- package/esm/__internal__/input/input-presentation.component.js +7 -20
- package/esm/__internal__/input/input-presentation.style.d.ts +5 -8
- package/esm/__internal__/input/input-presentation.style.js +37 -53
- package/esm/__internal__/input/input-sizes.style.d.ts +8 -18
- package/esm/__internal__/input/input-sizes.style.js +3 -2
- package/esm/__internal__/input/input.component.d.ts +39 -2
- package/esm/__internal__/input/input.component.js +84 -66
- package/esm/__internal__/input/input.style.d.ts +2 -1
- package/esm/__internal__/input/input.style.js +0 -4
- package/esm/__internal__/input-behaviour/index.d.ts +2 -1
- package/esm/__internal__/input-behaviour/input-behaviour.component.d.ts +7 -10
- package/esm/__internal__/input-behaviour/input-behaviour.component.js +2 -7
- package/esm/__internal__/input-behaviour/input-group-behaviour.component.d.ts +8 -12
- package/esm/__internal__/input-behaviour/input-group-behaviour.component.js +1 -7
- package/esm/__internal__/input-behaviour/useInputBehaviour.d.ts +14 -10
- package/esm/__internal__/label/label.d.ts +1 -1
- package/esm/components/badge/badge.component.d.ts +10 -13
- package/esm/components/badge/badge.component.js +60 -24
- package/esm/components/badge/badge.style.d.ts +7 -5
- package/esm/components/badge/index.d.ts +2 -1
- package/esm/components/carbon-provider/carbon-provider.component.d.ts +8 -14
- package/esm/components/carbon-provider/carbon-provider.component.js +110 -14
- package/esm/components/carbon-provider/index.d.ts +2 -1
- package/esm/components/date-range/date-range.style.js +2 -2
- package/esm/components/decimal/decimal.component.js +2 -1
- package/esm/components/heading/heading.style.d.ts +1 -2
- package/esm/components/inline-inputs/index.d.ts +2 -1
- package/esm/components/inline-inputs/index.js +1 -1
- package/esm/components/inline-inputs/inline-inputs.component.d.ts +25 -22
- package/esm/components/inline-inputs/inline-inputs.component.js +96 -60
- package/esm/components/inline-inputs/inline-inputs.config.d.ts +1 -1
- package/esm/components/inline-inputs/inline-inputs.style.d.ts +5 -3
- package/esm/components/inline-inputs/inline-inputs.style.js +2 -2
- package/esm/components/link/index.d.ts +1 -2
- package/esm/components/link/link.component.d.ts +37 -2
- package/esm/components/link/link.component.js +1243 -124
- package/esm/components/link/link.config.d.ts +2 -2
- package/esm/components/link/link.style.d.ts +7 -2
- package/esm/components/link/link.style.js +0 -5
- package/esm/components/pager/pager.style.d.ts +1 -2
- package/esm/components/pod/pod.style.d.ts +1 -2
- package/esm/components/simple-color-picker/simple-color-input/simple-color-input.style.d.ts +1 -1
- package/esm/components/split-button/index.d.ts +1 -0
- package/esm/components/tabs/__internal__/tab-title/tab-title.style.js +3 -5
- package/esm/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -2
- package/esm/components/tile-select/tile-select.style.d.ts +1 -1
- package/lib/__internal__/input/index.d.ts +5 -5
- package/lib/__internal__/input/input-presentation.component.d.ts +21 -27
- package/lib/__internal__/input/input-presentation.component.js +7 -23
- package/lib/__internal__/input/input-presentation.style.d.ts +5 -8
- package/lib/__internal__/input/input-presentation.style.js +37 -54
- package/lib/__internal__/input/input-sizes.style.d.ts +8 -18
- package/lib/__internal__/input/input-sizes.style.js +2 -1
- package/lib/__internal__/input/input.component.d.ts +39 -2
- package/lib/__internal__/input/input.component.js +85 -69
- package/lib/__internal__/input/input.style.d.ts +2 -1
- package/lib/__internal__/input/input.style.js +0 -7
- package/lib/__internal__/input-behaviour/index.d.ts +2 -1
- package/lib/__internal__/input-behaviour/input-behaviour.component.d.ts +7 -10
- package/lib/__internal__/input-behaviour/input-behaviour.component.js +3 -10
- package/lib/__internal__/input-behaviour/input-group-behaviour.component.d.ts +8 -12
- package/lib/__internal__/input-behaviour/input-group-behaviour.component.js +2 -10
- package/lib/__internal__/input-behaviour/useInputBehaviour.d.ts +14 -10
- package/lib/__internal__/label/label.d.ts +1 -1
- package/lib/components/badge/badge.component.d.ts +10 -13
- package/lib/components/badge/badge.component.js +51 -29
- package/lib/components/badge/badge.style.d.ts +7 -5
- package/lib/components/badge/index.d.ts +2 -1
- package/lib/components/carbon-provider/carbon-provider.component.d.ts +8 -14
- package/lib/components/carbon-provider/carbon-provider.component.js +115 -20
- package/lib/components/carbon-provider/index.d.ts +2 -1
- package/lib/components/date-range/date-range.style.js +4 -4
- package/lib/components/decimal/decimal.component.js +2 -1
- package/lib/components/heading/heading.style.d.ts +1 -2
- package/lib/components/inline-inputs/index.d.ts +2 -1
- package/lib/components/inline-inputs/index.js +10 -2
- package/lib/components/inline-inputs/inline-inputs.component.d.ts +25 -22
- package/lib/components/inline-inputs/inline-inputs.component.js +143 -68
- package/lib/components/inline-inputs/inline-inputs.config.d.ts +1 -1
- package/lib/components/inline-inputs/inline-inputs.style.d.ts +5 -3
- package/lib/components/inline-inputs/inline-inputs.style.js +2 -2
- package/lib/components/link/index.d.ts +1 -2
- package/lib/components/link/link.component.d.ts +37 -2
- package/lib/components/link/link.component.js +764 -146
- package/lib/components/link/link.config.d.ts +2 -2
- package/lib/components/link/link.style.d.ts +7 -2
- package/lib/components/link/link.style.js +0 -6
- package/lib/components/pager/pager.style.d.ts +1 -2
- package/lib/components/pod/pod.style.d.ts +1 -2
- package/lib/components/simple-color-picker/simple-color-input/simple-color-input.style.d.ts +1 -1
- package/lib/components/split-button/index.d.ts +1 -0
- package/lib/components/tabs/__internal__/tab-title/tab-title.style.js +3 -5
- package/lib/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -2
- package/lib/components/tile-select/tile-select.style.d.ts +1 -1
- package/package.json +1 -2
- package/esm/__internal__/input/extract-props/extract-props.d.ts +0 -1
- package/esm/__internal__/input/extract-props/extract-props.js +0 -11
- package/esm/__internal__/input/extract-props/index.d.ts +0 -1
- package/esm/__internal__/input/extract-props/index.js +0 -1
- package/esm/__internal__/input/input-presentation.d.ts +0 -24
- package/esm/__internal__/input/input.d.ts +0 -54
- package/esm/components/badge/badge.d.ts +0 -14
- package/esm/components/carbon-provider/carbon-provider.d.ts +0 -12
- package/esm/components/inline-inputs/inline-inputs.d.ts +0 -30
- package/esm/components/link/link.d.ts +0 -47
- package/lib/__internal__/input/extract-props/extract-props.d.ts +0 -1
- package/lib/__internal__/input/extract-props/extract-props.js +0 -18
- package/lib/__internal__/input/extract-props/index.d.ts +0 -1
- package/lib/__internal__/input/extract-props/index.js +0 -15
- package/lib/__internal__/input/extract-props/package.json +0 -6
- package/lib/__internal__/input/input-presentation.d.ts +0 -24
- package/lib/__internal__/input/input.d.ts +0 -54
- package/lib/components/badge/badge.d.ts +0 -14
- package/lib/components/carbon-provider/carbon-provider.d.ts +0 -12
- package/lib/components/inline-inputs/inline-inputs.d.ts +0 -30
- package/lib/components/link/link.d.ts +0 -47
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const LINK_POSITIONS: string[];
|
|
2
|
-
export const LINK_ALIGNMENTS: string[];
|
|
1
|
+
export declare const LINK_POSITIONS: string[];
|
|
2
|
+
export declare const LINK_ALIGNMENTS: string[];
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { LinkProps } from "./link.component";
|
|
2
|
+
interface StyledLinkProps extends Pick<LinkProps, "isSkipLink" | "iconAlign" | "disabled"> {
|
|
3
|
+
hasContent: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const StyledLink: import("styled-components").StyledComponent<"span", any, StyledLinkProps, never>;
|
|
6
|
+
declare const StyledContent: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
7
|
+
export { StyledLink, StyledContent };
|
|
@@ -7,8 +7,6 @@ exports.StyledContent = exports.StyledLink = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _styledComponents = _interopRequireWildcard(require("styled-components"));
|
|
9
9
|
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
10
|
var _base = _interopRequireDefault(require("../../style/themes/base"));
|
|
13
11
|
|
|
14
12
|
var _icon = _interopRequireDefault(require("../icon/icon.style"));
|
|
@@ -100,9 +98,5 @@ StyledLink.defaultProps = {
|
|
|
100
98
|
disabled: false,
|
|
101
99
|
hasContent: true
|
|
102
100
|
};
|
|
103
|
-
StyledLink.propTypes = {
|
|
104
|
-
disabled: _propTypes.default.bool,
|
|
105
|
-
hasContent: _propTypes.default.bool
|
|
106
|
-
};
|
|
107
101
|
const StyledContent = _styledComponents.default.span``;
|
|
108
102
|
exports.StyledContent = StyledContent;
|
|
@@ -3,8 +3,7 @@ export const StyledPagerSizeOptions: import("styled-components").StyledComponent
|
|
|
3
3
|
export const StyledPagerSizeOptionsInner: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export const StyledPagerNavigation: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export const StyledPagerNavInner: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
|
-
export const StyledPagerLinkStyles: import("styled-components").StyledComponent<
|
|
6
|
+
export const StyledPagerLinkStyles: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../link/link.component").LinkProps & import("react").RefAttributes<HTMLLinkElement | HTMLButtonElement>>, any, {}, never>;
|
|
7
7
|
export const StyledPagerNoSelect: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
8
8
|
export const StyledPagerSummary: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
9
9
|
export const StyledSelectContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
|
-
import Link from "../link";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const StyledBlock: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
2
|
export const StyledContent: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
|
-
export const StyledEditAction: import("styled-components").StyledComponent<
|
|
3
|
+
export const StyledEditAction: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../link/link.component").LinkProps & import("react").RefAttributes<HTMLLinkElement | HTMLButtonElement>>, any, {}, never>;
|
|
4
4
|
export const StyledActionsContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
5
|
export const StyledDeleteButton: import("styled-components").StyledComponent<typeof IconButton, any, {}, never>;
|
|
6
6
|
export const StyledUndoButton: import("styled-components").StyledComponent<typeof IconButton, any, {}, never>;
|
|
@@ -9,5 +9,4 @@ export const StyledPod: import("styled-components").StyledComponent<"div", any,
|
|
|
9
9
|
export const StyledHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
10
|
export const StyledSubtitle: import("styled-components").StyledComponent<"h5", any, {}, never>;
|
|
11
11
|
export const StyledTitle: import("styled-components").StyledComponent<"h4", any, {}, never>;
|
|
12
|
-
import Link from "../link";
|
|
13
12
|
import IconButton from "../icon-button";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default StyledSimpleColorInput;
|
|
2
|
-
declare const StyledSimpleColorInput: import("styled-components").StyledComponent<
|
|
2
|
+
declare const StyledSimpleColorInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../__internal__/input").InputProps & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
@@ -374,18 +374,16 @@ const StyledTabTitle = _styledComponents.default.button`
|
|
|
374
374
|
|
|
375
375
|
${alternateStyling && (0, _styledComponents.css)`
|
|
376
376
|
&:focus {
|
|
377
|
-
background-color: var(--
|
|
377
|
+
background-color: var(--colorsActionMinor200);
|
|
378
378
|
}
|
|
379
379
|
|
|
380
380
|
&:hover {
|
|
381
|
-
background-color: ${isTabSelected ? "var(--
|
|
381
|
+
background-color: ${isTabSelected ? "var(--colorsActionMinor200)" : "var(--colorsActionMinor250)"};
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
${isTabSelected && (0, _styledComponents.css)`
|
|
385
|
-
background-color: var(--
|
|
385
|
+
background-color: var(--colorsActionMinor200);
|
|
386
386
|
`}
|
|
387
|
-
|
|
388
|
-
${isInSidebar && `padding-bottom: 1px;`}
|
|
389
387
|
`}
|
|
390
388
|
`}
|
|
391
389
|
`;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
1
|
export default StyledEditorLink;
|
|
2
|
-
declare const StyledEditorLink: import("styled-components").StyledComponent<
|
|
3
|
-
import Link from "../../../link";
|
|
2
|
+
declare const StyledEditorLink: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../link/link.component").LinkProps & import("react").RefAttributes<HTMLLinkElement | HTMLButtonElement>>, any, {}, never>;
|
|
@@ -2,7 +2,7 @@ export const StyledTileSelectFieldset: import("styled-components").StyledCompone
|
|
|
2
2
|
export const StyledGroupDescription: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
3
3
|
export const StyledTileSelectContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export const StyledTileSelect: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
5
|
-
export const StyledTileSelectInput: import("styled-components").StyledComponent<
|
|
5
|
+
export const StyledTileSelectInput: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../__internal__/input").InputProps & import("react").RefAttributes<HTMLInputElement>>, any, {}, never>;
|
|
6
6
|
export const StyledTitleContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
7
|
export const StyledTitle: import("styled-components").StyledComponent<"h3", any, {}, never>;
|
|
8
8
|
export const StyledSubtitle: import("styled-components").StyledComponent<"h4", any, {}, never>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "carbon-react",
|
|
3
|
-
"version": "106.0.
|
|
3
|
+
"version": "106.0.3",
|
|
4
4
|
"description": "A library of reusable React components for easily building user interfaces.",
|
|
5
5
|
"engineStrict": true,
|
|
6
6
|
"engines": {
|
|
@@ -159,7 +159,6 @@
|
|
|
159
159
|
"typescript": "^4.6.2",
|
|
160
160
|
"typescript-to-proptypes": "^2.2.1",
|
|
161
161
|
"uuid": "^8.3.2",
|
|
162
|
-
"webfontloader": "^1.6.28",
|
|
163
162
|
"webpack-dev-server": "^4.0.0"
|
|
164
163
|
},
|
|
165
164
|
"dependencies": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function extractProps(props: any, reactComponent: any): {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export default function extractProps(props, reactComponent) {
|
|
2
|
-
const expectedKeys = reactComponent.safeProps;
|
|
3
|
-
const mainObjectKeys = Object.keys(props);
|
|
4
|
-
const filteredKeys = mainObjectKeys.filter(key => expectedKeys.includes(key));
|
|
5
|
-
const filteredObject = filteredKeys.reduce((obj, key) => {
|
|
6
|
-
return { ...obj,
|
|
7
|
-
[key]: props[key]
|
|
8
|
-
};
|
|
9
|
-
}, {});
|
|
10
|
-
return filteredObject;
|
|
11
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./extract-props";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./extract-props";
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ValidationPropTypes } from "../validations";
|
|
3
|
-
|
|
4
|
-
export interface CommonInputPresentationProps extends ValidationPropTypes {
|
|
5
|
-
/** If true, the component will be disabled */
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
/** The default value alignment on the input */
|
|
8
|
-
align?: string;
|
|
9
|
-
/** The width of the input as a percentage */
|
|
10
|
-
inputWidth?: number;
|
|
11
|
-
/** If true, the component will be read-only */
|
|
12
|
-
readOnly?: boolean;
|
|
13
|
-
/** Size of an input */
|
|
14
|
-
size?: "small" | "medium" | "large";
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface InputPresentationProps extends CommonInputPresentationProps {
|
|
18
|
-
/** Content to be rendered before the input */
|
|
19
|
-
positionedChildren?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare function InputPresentation(props: InputPresentationProps): JSX.Element;
|
|
23
|
-
|
|
24
|
-
export default InputPresentation;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface CommonInputProps
|
|
4
|
-
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "type"> {
|
|
5
|
-
/* The default value alignment on the input */
|
|
6
|
-
align?: "right" | "left";
|
|
7
|
-
/** If true the Component will be focused when rendered */
|
|
8
|
-
autoFocus?: boolean;
|
|
9
|
-
/** If true, the component will be disabled */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** HTML id attribute of the input */
|
|
12
|
-
id?: string;
|
|
13
|
-
/** A callback to retrieve the input reference */
|
|
14
|
-
inputRef?: (input: React.RefObject<HTMLInputElement>) => void;
|
|
15
|
-
/** Name of the input */
|
|
16
|
-
name?: string;
|
|
17
|
-
/** Specify a callback triggered on blur */
|
|
18
|
-
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
19
|
-
/** Specify a callback triggered on change */
|
|
20
|
-
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
-
/** pecify a callback triggered on click */
|
|
22
|
-
onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
23
|
-
/** Specify a callback triggered on focus */
|
|
24
|
-
onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
25
|
-
/** Specify a callback triggered on keyDown */
|
|
26
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
27
|
-
/** Placeholder string to be displayed in input */
|
|
28
|
-
placeholder?: string;
|
|
29
|
-
/** If true, the component will be read-only */
|
|
30
|
-
readOnly?: boolean;
|
|
31
|
-
/** Flag to configure component as mandatory */
|
|
32
|
-
required?: boolean;
|
|
33
|
-
/** The value of the Input */
|
|
34
|
-
value?:
|
|
35
|
-
| string
|
|
36
|
-
| string[]
|
|
37
|
-
| Record<string, unknown>
|
|
38
|
-
| Record<string, unknown>[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface InputProps extends CommonInputProps {
|
|
42
|
-
/** Integer to determine a timeout for the defered callback */
|
|
43
|
-
deferTimeout?: number;
|
|
44
|
-
/** Defered callback to be called after the onChange event */
|
|
45
|
-
onChangeDeferred?: () => void;
|
|
46
|
-
/** HTML type attribute of the input */
|
|
47
|
-
type?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare function Input(
|
|
51
|
-
props: InputProps & React.RefAttributes<HTMLInputElement>
|
|
52
|
-
): JSX.Element;
|
|
53
|
-
|
|
54
|
-
export default Input;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface BadgeProps {
|
|
4
|
-
/** The badge will be added to this element */
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/** The number rendered in the badge component */
|
|
7
|
-
counter?: string | number;
|
|
8
|
-
/** Callback fired when badge is clicked */
|
|
9
|
-
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare function Badge(props: BadgeProps): JSX.Element;
|
|
13
|
-
|
|
14
|
-
export default Badge;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { ThemeObject } from "../../style/themes/base";
|
|
4
|
-
|
|
5
|
-
export interface CarbonProviderProps {
|
|
6
|
-
theme?: ThemeObject;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
validationRedesignOptIn?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare function CarbonProvider(props: CarbonProviderProps): JSX.Element;
|
|
12
|
-
export default CarbonProvider;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface InlineInputsProps {
|
|
4
|
-
/** Children elements */
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
/** [Legacy prop] A custom class name for the component. */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Gutter prop gets passed down to Row component if false gutter value is "none" */
|
|
9
|
-
gutter?:
|
|
10
|
-
| "none"
|
|
11
|
-
| "extra-small"
|
|
12
|
-
| "small"
|
|
13
|
-
| "medium-small"
|
|
14
|
-
| "medium"
|
|
15
|
-
| "medium-large"
|
|
16
|
-
| "large"
|
|
17
|
-
| "extra-large";
|
|
18
|
-
/** The id of the corresponding input control for the label */
|
|
19
|
-
htmlFor?: string;
|
|
20
|
-
/** Width of the inline inputs container in percentage */
|
|
21
|
-
inputWidth?: number;
|
|
22
|
-
/** Defines the label text for the heading. */
|
|
23
|
-
label?: string;
|
|
24
|
-
/** Width of a label in percentage */
|
|
25
|
-
labelWidth?: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare function InlineInputs(props: InlineInputsProps): JSX.Element;
|
|
29
|
-
|
|
30
|
-
export default InlineInputs;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { IconType } from "components/icon/icon";
|
|
3
|
-
|
|
4
|
-
export interface LinkProps {
|
|
5
|
-
/** The disabled state of the link. */
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
/** An href for an anchor tag. */
|
|
8
|
-
href?: string;
|
|
9
|
-
/** An icon to display next to the link. */
|
|
10
|
-
icon?: IconType;
|
|
11
|
-
/** Which side of the link to the render the link. */
|
|
12
|
-
iconAlign?: "left" | "right";
|
|
13
|
-
/** Function called when the mouse is clicked. */
|
|
14
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
15
|
-
/** Function called when a key is pressed. */
|
|
16
|
-
onKeyDown?:
|
|
17
|
-
| React.KeyboardEventHandler<HTMLAnchorElement>
|
|
18
|
-
| React.KeyboardEventHandler<HTMLButtonElement>;
|
|
19
|
-
/** Function called when a mouse down event triggers. */
|
|
20
|
-
onMouseDown?:
|
|
21
|
-
| React.MouseEventHandler<HTMLAnchorElement>
|
|
22
|
-
| React.MouseEventHandler<HTMLButtonElement>;
|
|
23
|
-
/** Whether to include the link in the tab order of the page */
|
|
24
|
-
tabbable?: boolean;
|
|
25
|
-
/** A message to display as a tooltip to the link. */
|
|
26
|
-
tooltipMessage?: string;
|
|
27
|
-
/** Positions the tooltip with the link. */
|
|
28
|
-
tooltipPosition?: "bottom" | "left" | "right" | "top";
|
|
29
|
-
/** Child content to render in the link. */
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
/** Target property in which link should open ie: _blank, _self, _parent, _top */
|
|
32
|
-
target?: string;
|
|
33
|
-
/** Aria label for accessibility purposes */
|
|
34
|
-
ariaLabel?: string;
|
|
35
|
-
/** Allows to create skip link */
|
|
36
|
-
isSkipLink?: boolean;
|
|
37
|
-
/** allows to set rel property in <a> tag */
|
|
38
|
-
rel?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
declare type LinkRefAttributes =
|
|
42
|
-
| React.RefAttributes<HTMLLinkElement>
|
|
43
|
-
| React.RefAttributes<HTMLButtonElement>;
|
|
44
|
-
|
|
45
|
-
declare function Link(props: LinkProps & LinkRefAttributes): JSX.Element;
|
|
46
|
-
|
|
47
|
-
export default Link;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function extractProps(props: any, reactComponent: any): {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = extractProps;
|
|
7
|
-
|
|
8
|
-
function extractProps(props, reactComponent) {
|
|
9
|
-
const expectedKeys = reactComponent.safeProps;
|
|
10
|
-
const mainObjectKeys = Object.keys(props);
|
|
11
|
-
const filteredKeys = mainObjectKeys.filter(key => expectedKeys.includes(key));
|
|
12
|
-
const filteredObject = filteredKeys.reduce((obj, key) => {
|
|
13
|
-
return { ...obj,
|
|
14
|
-
[key]: props[key]
|
|
15
|
-
};
|
|
16
|
-
}, {});
|
|
17
|
-
return filteredObject;
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./extract-props";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "default", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _extractProps.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
var _extractProps = _interopRequireDefault(require("./extract-props"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { ValidationPropTypes } from "../validations";
|
|
3
|
-
|
|
4
|
-
export interface CommonInputPresentationProps extends ValidationPropTypes {
|
|
5
|
-
/** If true, the component will be disabled */
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
/** The default value alignment on the input */
|
|
8
|
-
align?: string;
|
|
9
|
-
/** The width of the input as a percentage */
|
|
10
|
-
inputWidth?: number;
|
|
11
|
-
/** If true, the component will be read-only */
|
|
12
|
-
readOnly?: boolean;
|
|
13
|
-
/** Size of an input */
|
|
14
|
-
size?: "small" | "medium" | "large";
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface InputPresentationProps extends CommonInputPresentationProps {
|
|
18
|
-
/** Content to be rendered before the input */
|
|
19
|
-
positionedChildren?: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
declare function InputPresentation(props: InputPresentationProps): JSX.Element;
|
|
23
|
-
|
|
24
|
-
export default InputPresentation;
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface CommonInputProps
|
|
4
|
-
extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "type"> {
|
|
5
|
-
/* The default value alignment on the input */
|
|
6
|
-
align?: "right" | "left";
|
|
7
|
-
/** If true the Component will be focused when rendered */
|
|
8
|
-
autoFocus?: boolean;
|
|
9
|
-
/** If true, the component will be disabled */
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
/** HTML id attribute of the input */
|
|
12
|
-
id?: string;
|
|
13
|
-
/** A callback to retrieve the input reference */
|
|
14
|
-
inputRef?: (input: React.RefObject<HTMLInputElement>) => void;
|
|
15
|
-
/** Name of the input */
|
|
16
|
-
name?: string;
|
|
17
|
-
/** Specify a callback triggered on blur */
|
|
18
|
-
onBlur?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
19
|
-
/** Specify a callback triggered on change */
|
|
20
|
-
onChange?: (ev: React.ChangeEvent<HTMLInputElement>) => void;
|
|
21
|
-
/** pecify a callback triggered on click */
|
|
22
|
-
onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
|
|
23
|
-
/** Specify a callback triggered on focus */
|
|
24
|
-
onFocus?: (ev: React.FocusEvent<HTMLInputElement>) => void;
|
|
25
|
-
/** Specify a callback triggered on keyDown */
|
|
26
|
-
onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
27
|
-
/** Placeholder string to be displayed in input */
|
|
28
|
-
placeholder?: string;
|
|
29
|
-
/** If true, the component will be read-only */
|
|
30
|
-
readOnly?: boolean;
|
|
31
|
-
/** Flag to configure component as mandatory */
|
|
32
|
-
required?: boolean;
|
|
33
|
-
/** The value of the Input */
|
|
34
|
-
value?:
|
|
35
|
-
| string
|
|
36
|
-
| string[]
|
|
37
|
-
| Record<string, unknown>
|
|
38
|
-
| Record<string, unknown>[];
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
export interface InputProps extends CommonInputProps {
|
|
42
|
-
/** Integer to determine a timeout for the defered callback */
|
|
43
|
-
deferTimeout?: number;
|
|
44
|
-
/** Defered callback to be called after the onChange event */
|
|
45
|
-
onChangeDeferred?: () => void;
|
|
46
|
-
/** HTML type attribute of the input */
|
|
47
|
-
type?: string;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare function Input(
|
|
51
|
-
props: InputProps & React.RefAttributes<HTMLInputElement>
|
|
52
|
-
): JSX.Element;
|
|
53
|
-
|
|
54
|
-
export default Input;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface BadgeProps {
|
|
4
|
-
/** The badge will be added to this element */
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/** The number rendered in the badge component */
|
|
7
|
-
counter?: string | number;
|
|
8
|
-
/** Callback fired when badge is clicked */
|
|
9
|
-
onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare function Badge(props: BadgeProps): JSX.Element;
|
|
13
|
-
|
|
14
|
-
export default Badge;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
import { ThemeObject } from "../../style/themes/base";
|
|
4
|
-
|
|
5
|
-
export interface CarbonProviderProps {
|
|
6
|
-
theme?: ThemeObject;
|
|
7
|
-
children: React.ReactNode;
|
|
8
|
-
validationRedesignOptIn?: boolean;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare function CarbonProvider(props: CarbonProviderProps): JSX.Element;
|
|
12
|
-
export default CarbonProvider;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
|
|
3
|
-
export interface InlineInputsProps {
|
|
4
|
-
/** Children elements */
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
/** [Legacy prop] A custom class name for the component. */
|
|
7
|
-
className?: string;
|
|
8
|
-
/** Gutter prop gets passed down to Row component if false gutter value is "none" */
|
|
9
|
-
gutter?:
|
|
10
|
-
| "none"
|
|
11
|
-
| "extra-small"
|
|
12
|
-
| "small"
|
|
13
|
-
| "medium-small"
|
|
14
|
-
| "medium"
|
|
15
|
-
| "medium-large"
|
|
16
|
-
| "large"
|
|
17
|
-
| "extra-large";
|
|
18
|
-
/** The id of the corresponding input control for the label */
|
|
19
|
-
htmlFor?: string;
|
|
20
|
-
/** Width of the inline inputs container in percentage */
|
|
21
|
-
inputWidth?: number;
|
|
22
|
-
/** Defines the label text for the heading. */
|
|
23
|
-
label?: string;
|
|
24
|
-
/** Width of a label in percentage */
|
|
25
|
-
labelWidth?: number;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
declare function InlineInputs(props: InlineInputsProps): JSX.Element;
|
|
29
|
-
|
|
30
|
-
export default InlineInputs;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { IconType } from "components/icon/icon";
|
|
3
|
-
|
|
4
|
-
export interface LinkProps {
|
|
5
|
-
/** The disabled state of the link. */
|
|
6
|
-
disabled?: boolean;
|
|
7
|
-
/** An href for an anchor tag. */
|
|
8
|
-
href?: string;
|
|
9
|
-
/** An icon to display next to the link. */
|
|
10
|
-
icon?: IconType;
|
|
11
|
-
/** Which side of the link to the render the link. */
|
|
12
|
-
iconAlign?: "left" | "right";
|
|
13
|
-
/** Function called when the mouse is clicked. */
|
|
14
|
-
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
15
|
-
/** Function called when a key is pressed. */
|
|
16
|
-
onKeyDown?:
|
|
17
|
-
| React.KeyboardEventHandler<HTMLAnchorElement>
|
|
18
|
-
| React.KeyboardEventHandler<HTMLButtonElement>;
|
|
19
|
-
/** Function called when a mouse down event triggers. */
|
|
20
|
-
onMouseDown?:
|
|
21
|
-
| React.MouseEventHandler<HTMLAnchorElement>
|
|
22
|
-
| React.MouseEventHandler<HTMLButtonElement>;
|
|
23
|
-
/** Whether to include the link in the tab order of the page */
|
|
24
|
-
tabbable?: boolean;
|
|
25
|
-
/** A message to display as a tooltip to the link. */
|
|
26
|
-
tooltipMessage?: string;
|
|
27
|
-
/** Positions the tooltip with the link. */
|
|
28
|
-
tooltipPosition?: "bottom" | "left" | "right" | "top";
|
|
29
|
-
/** Child content to render in the link. */
|
|
30
|
-
children?: React.ReactNode;
|
|
31
|
-
/** Target property in which link should open ie: _blank, _self, _parent, _top */
|
|
32
|
-
target?: string;
|
|
33
|
-
/** Aria label for accessibility purposes */
|
|
34
|
-
ariaLabel?: string;
|
|
35
|
-
/** Allows to create skip link */
|
|
36
|
-
isSkipLink?: boolean;
|
|
37
|
-
/** allows to set rel property in <a> tag */
|
|
38
|
-
rel?: string;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
declare type LinkRefAttributes =
|
|
42
|
-
| React.RefAttributes<HTMLLinkElement>
|
|
43
|
-
| React.RefAttributes<HTMLButtonElement>;
|
|
44
|
-
|
|
45
|
-
declare function Link(props: LinkProps & LinkRefAttributes): JSX.Element;
|
|
46
|
-
|
|
47
|
-
export default Link;
|