carbon-react 109.6.0 → 110.0.0
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__/checkable-input/checkable-input-svg-wrapper.style.d.ts +2 -0
- package/esm/__internal__/checkable-input/checkable-input.style.d.ts +2 -0
- package/esm/__internal__/checkable-input/hidden-checkable-input.style.d.ts +2 -0
- package/esm/components/carbon-provider/carbon-provider.component.js +1 -0
- package/esm/components/checkbox/checkbox.style.d.ts +3 -0
- package/esm/components/dismissible-box/dismissible-box.component.d.ts +17 -0
- package/esm/components/dismissible-box/dismissible-box.component.js +2003 -37
- package/esm/components/dismissible-box/dismissible-box.style.d.ts +8 -0
- package/esm/components/dismissible-box/dismissible-box.style.js +9 -4
- package/esm/components/dismissible-box/index.d.ts +2 -1
- package/esm/components/fieldset/fieldset.component.d.ts +11 -0
- package/esm/components/fieldset/fieldset.component.js +158 -17
- package/esm/components/fieldset/fieldset.style.d.ts +8 -0
- package/esm/components/fieldset/index.d.ts +2 -1
- package/esm/components/global-header/global-header.component.d.ts +13 -0
- package/esm/components/global-header/global-header.component.js +1058 -0
- package/esm/components/global-header/index.d.ts +2 -0
- package/esm/components/global-header/index.js +1 -0
- package/esm/components/grid/grid-container/grid-container.component.js +4 -23
- package/esm/components/link/link.component.d.ts +0 -2
- package/esm/components/link/link.component.js +0 -4
- package/esm/components/menu/__internal__/submenu/submenu.component.js +1 -2
- package/esm/components/menu/menu.d.ts +2 -2
- package/esm/components/navigation-bar/navigation-bar.style.d.ts +10 -0
- package/esm/components/pages/pages.component.js +1 -0
- package/esm/components/pill/pill.component.js +1 -0
- package/esm/components/text-editor/__internal__/editor-link/editor-link.component.js +3 -4
- package/esm/global.d.ts +1 -0
- package/esm/style/themes/base/base-theme.config.d.ts +1 -0
- package/esm/style/themes/base/base-theme.config.js +2 -1
- package/esm/style/themes/sage/index.d.ts +1 -0
- package/lib/__internal__/checkable-input/checkable-input-svg-wrapper.style.d.ts +2 -0
- package/lib/__internal__/checkable-input/checkable-input.style.d.ts +2 -0
- package/lib/__internal__/checkable-input/hidden-checkable-input.style.d.ts +2 -0
- package/lib/components/carbon-provider/carbon-provider.component.js +1 -0
- package/lib/components/checkbox/checkbox.style.d.ts +3 -0
- package/lib/components/dismissible-box/dismissible-box.component.d.ts +17 -0
- package/lib/components/dismissible-box/dismissible-box.component.js +2005 -41
- package/lib/components/dismissible-box/dismissible-box.style.d.ts +8 -0
- package/lib/components/dismissible-box/dismissible-box.style.js +9 -6
- package/lib/components/dismissible-box/index.d.ts +2 -1
- package/lib/components/fieldset/fieldset.component.d.ts +11 -0
- package/lib/components/fieldset/fieldset.component.js +158 -19
- package/lib/components/fieldset/fieldset.style.d.ts +8 -0
- package/lib/components/fieldset/index.d.ts +2 -1
- package/lib/components/global-header/global-header.component.d.ts +13 -0
- package/lib/components/global-header/global-header.component.js +1078 -0
- package/lib/components/global-header/index.d.ts +2 -0
- package/lib/components/global-header/index.js +15 -0
- package/lib/components/global-header/package.json +6 -0
- package/lib/components/grid/grid-container/grid-container.component.js +4 -30
- package/lib/components/link/link.component.d.ts +0 -2
- package/lib/components/link/link.component.js +0 -4
- package/lib/components/menu/__internal__/submenu/submenu.component.js +1 -2
- package/lib/components/menu/menu.d.ts +2 -2
- package/lib/components/navigation-bar/navigation-bar.style.d.ts +10 -0
- package/lib/components/pages/pages.component.js +1 -0
- package/lib/components/pill/pill.component.js +1 -0
- package/lib/components/text-editor/__internal__/editor-link/editor-link.component.js +3 -4
- package/lib/global.d.ts +1 -0
- package/lib/style/themes/base/base-theme.config.d.ts +1 -0
- package/lib/style/themes/base/base-theme.config.js +2 -1
- package/lib/style/themes/sage/index.d.ts +1 -0
- package/package.json +1 -1
- package/esm/components/dismissible-box/dismissible-box.d.ts +0 -18
- package/esm/components/fieldset/fieldset.d.ts +0 -15
- package/lib/components/dismissible-box/dismissible-box.d.ts +0 -18
- package/lib/components/fieldset/fieldset.d.ts +0 -15
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface StyledDismissibleBoxProps {
|
|
2
|
+
/** Flag to control whether the thicker left border highlight should be rendered */
|
|
3
|
+
hasBorderLeftHighlight?: boolean;
|
|
4
|
+
/** Set the base color variant */
|
|
5
|
+
variant?: "light" | "dark";
|
|
6
|
+
}
|
|
7
|
+
declare const StyledDismissibleBox: import("styled-components").StyledComponent<"div", any, import("../box").BoxProps & StyledDismissibleBoxProps, never>;
|
|
8
|
+
export { StyledDismissibleBox };
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import styled, { css } from "styled-components";
|
|
2
2
|
import Box from "../box";
|
|
3
3
|
import StyledIcon from "../icon/icon.style";
|
|
4
|
-
|
|
4
|
+
const StyledDismissibleBox = styled(Box)`
|
|
5
5
|
${({
|
|
6
|
-
hasBorderLeftHighlight
|
|
6
|
+
hasBorderLeftHighlight = true,
|
|
7
|
+
variant = "light"
|
|
7
8
|
}) => css`
|
|
8
|
-
|
|
9
|
+
background-color: ${variant === "light" ? "#FFFFFF" : "var(--colorsUtilityMajor050)"};
|
|
9
10
|
|
|
10
11
|
border: 1px solid var(--colorsUtilityMajor100);
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
word-break: break-word;
|
|
11
15
|
|
|
12
16
|
${hasBorderLeftHighlight && `
|
|
13
17
|
border-left: none;
|
|
@@ -18,4 +22,5 @@ export default styled(Box)`
|
|
|
18
22
|
color: var(--colorsActionMinor600);
|
|
19
23
|
}
|
|
20
24
|
`}
|
|
21
|
-
`;
|
|
25
|
+
`;
|
|
26
|
+
export { StyledDismissibleBox };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export type { DismissibleBoxProps } from "./dismissible-box.component";
|
|
2
|
+
export { default } from "./dismissible-box.component";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { MarginProps } from "styled-system";
|
|
3
|
+
import { StyledFieldsetProps } from "./fieldset.style";
|
|
4
|
+
export interface FieldsetProps extends StyledFieldsetProps, MarginProps {
|
|
5
|
+
/** Child elements */
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
/** The text for the fieldsets legend element. */
|
|
8
|
+
legend?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Fieldset: ({ children, inline, legend, ...rest }: FieldsetProps) => JSX.Element;
|
|
11
|
+
export default Fieldset;
|
|
@@ -2,16 +2,14 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
2
2
|
|
|
3
3
|
import React from "react";
|
|
4
4
|
import PropTypes from "prop-types";
|
|
5
|
-
import styledSystemPropTypes from "@styled-system/prop-types";
|
|
6
5
|
import tagComponent from "../../__internal__/utils/helpers/tags/tags";
|
|
7
6
|
import { filterStyledSystemMarginProps } from "../../style/utils";
|
|
8
7
|
import { FieldsetStyle, LegendContainerStyle, FieldsetContentStyle } from "./fieldset.style";
|
|
9
8
|
import { NewValidationContext } from "../carbon-provider/carbon-provider.component";
|
|
10
|
-
const marginPropTypes = filterStyledSystemMarginProps(styledSystemPropTypes.space);
|
|
11
9
|
|
|
12
10
|
const Fieldset = ({
|
|
13
11
|
children,
|
|
14
|
-
inline,
|
|
12
|
+
inline = false,
|
|
15
13
|
legend,
|
|
16
14
|
...rest
|
|
17
15
|
}) => {
|
|
@@ -38,19 +36,162 @@ const Fieldset = ({
|
|
|
38
36
|
};
|
|
39
37
|
|
|
40
38
|
Fieldset.propTypes = {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
39
|
+
"children": PropTypes.node,
|
|
40
|
+
"inline": PropTypes.bool,
|
|
41
|
+
"legend": PropTypes.string,
|
|
42
|
+
"m": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
43
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
44
|
+
"description": PropTypes.string,
|
|
45
|
+
"toString": PropTypes.func.isRequired,
|
|
46
|
+
"valueOf": PropTypes.func.isRequired
|
|
47
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
48
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
49
|
+
"description": PropTypes.string,
|
|
50
|
+
"toString": PropTypes.func.isRequired,
|
|
51
|
+
"valueOf": PropTypes.func.isRequired
|
|
52
|
+
}), PropTypes.string]),
|
|
53
|
+
"margin": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
54
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
55
|
+
"description": PropTypes.string,
|
|
56
|
+
"toString": PropTypes.func.isRequired,
|
|
57
|
+
"valueOf": PropTypes.func.isRequired
|
|
58
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
59
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
60
|
+
"description": PropTypes.string,
|
|
61
|
+
"toString": PropTypes.func.isRequired,
|
|
62
|
+
"valueOf": PropTypes.func.isRequired
|
|
63
|
+
}), PropTypes.string]),
|
|
64
|
+
"marginBottom": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
65
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
66
|
+
"description": PropTypes.string,
|
|
67
|
+
"toString": PropTypes.func.isRequired,
|
|
68
|
+
"valueOf": PropTypes.func.isRequired
|
|
69
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
70
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
71
|
+
"description": PropTypes.string,
|
|
72
|
+
"toString": PropTypes.func.isRequired,
|
|
73
|
+
"valueOf": PropTypes.func.isRequired
|
|
74
|
+
}), PropTypes.string]),
|
|
75
|
+
"marginLeft": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
76
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
77
|
+
"description": PropTypes.string,
|
|
78
|
+
"toString": PropTypes.func.isRequired,
|
|
79
|
+
"valueOf": PropTypes.func.isRequired
|
|
80
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
81
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
82
|
+
"description": PropTypes.string,
|
|
83
|
+
"toString": PropTypes.func.isRequired,
|
|
84
|
+
"valueOf": PropTypes.func.isRequired
|
|
85
|
+
}), PropTypes.string]),
|
|
86
|
+
"marginRight": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
87
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
88
|
+
"description": PropTypes.string,
|
|
89
|
+
"toString": PropTypes.func.isRequired,
|
|
90
|
+
"valueOf": PropTypes.func.isRequired
|
|
91
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
92
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
93
|
+
"description": PropTypes.string,
|
|
94
|
+
"toString": PropTypes.func.isRequired,
|
|
95
|
+
"valueOf": PropTypes.func.isRequired
|
|
96
|
+
}), PropTypes.string]),
|
|
97
|
+
"marginTop": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
98
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
99
|
+
"description": PropTypes.string,
|
|
100
|
+
"toString": PropTypes.func.isRequired,
|
|
101
|
+
"valueOf": PropTypes.func.isRequired
|
|
102
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
103
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
104
|
+
"description": PropTypes.string,
|
|
105
|
+
"toString": PropTypes.func.isRequired,
|
|
106
|
+
"valueOf": PropTypes.func.isRequired
|
|
107
|
+
}), PropTypes.string]),
|
|
108
|
+
"marginX": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
109
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
110
|
+
"description": PropTypes.string,
|
|
111
|
+
"toString": PropTypes.func.isRequired,
|
|
112
|
+
"valueOf": PropTypes.func.isRequired
|
|
113
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
114
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
115
|
+
"description": PropTypes.string,
|
|
116
|
+
"toString": PropTypes.func.isRequired,
|
|
117
|
+
"valueOf": PropTypes.func.isRequired
|
|
118
|
+
}), PropTypes.string]),
|
|
119
|
+
"marginY": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
120
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
121
|
+
"description": PropTypes.string,
|
|
122
|
+
"toString": PropTypes.func.isRequired,
|
|
123
|
+
"valueOf": PropTypes.func.isRequired
|
|
124
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
125
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
126
|
+
"description": PropTypes.string,
|
|
127
|
+
"toString": PropTypes.func.isRequired,
|
|
128
|
+
"valueOf": PropTypes.func.isRequired
|
|
129
|
+
}), PropTypes.string]),
|
|
130
|
+
"mb": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
131
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
132
|
+
"description": PropTypes.string,
|
|
133
|
+
"toString": PropTypes.func.isRequired,
|
|
134
|
+
"valueOf": PropTypes.func.isRequired
|
|
135
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
136
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
137
|
+
"description": PropTypes.string,
|
|
138
|
+
"toString": PropTypes.func.isRequired,
|
|
139
|
+
"valueOf": PropTypes.func.isRequired
|
|
140
|
+
}), PropTypes.string]),
|
|
141
|
+
"ml": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
142
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
143
|
+
"description": PropTypes.string,
|
|
144
|
+
"toString": PropTypes.func.isRequired,
|
|
145
|
+
"valueOf": PropTypes.func.isRequired
|
|
146
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
147
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
148
|
+
"description": PropTypes.string,
|
|
149
|
+
"toString": PropTypes.func.isRequired,
|
|
150
|
+
"valueOf": PropTypes.func.isRequired
|
|
151
|
+
}), PropTypes.string]),
|
|
152
|
+
"mr": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
153
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
154
|
+
"description": PropTypes.string,
|
|
155
|
+
"toString": PropTypes.func.isRequired,
|
|
156
|
+
"valueOf": PropTypes.func.isRequired
|
|
157
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
158
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
159
|
+
"description": PropTypes.string,
|
|
160
|
+
"toString": PropTypes.func.isRequired,
|
|
161
|
+
"valueOf": PropTypes.func.isRequired
|
|
162
|
+
}), PropTypes.string]),
|
|
163
|
+
"mt": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
164
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
165
|
+
"description": PropTypes.string,
|
|
166
|
+
"toString": PropTypes.func.isRequired,
|
|
167
|
+
"valueOf": PropTypes.func.isRequired
|
|
168
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
169
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
170
|
+
"description": PropTypes.string,
|
|
171
|
+
"toString": PropTypes.func.isRequired,
|
|
172
|
+
"valueOf": PropTypes.func.isRequired
|
|
173
|
+
}), PropTypes.string]),
|
|
174
|
+
"mx": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
175
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
176
|
+
"description": PropTypes.string,
|
|
177
|
+
"toString": PropTypes.func.isRequired,
|
|
178
|
+
"valueOf": PropTypes.func.isRequired
|
|
179
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
180
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
181
|
+
"description": PropTypes.string,
|
|
182
|
+
"toString": PropTypes.func.isRequired,
|
|
183
|
+
"valueOf": PropTypes.func.isRequired
|
|
184
|
+
}), PropTypes.string]),
|
|
185
|
+
"my": PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf([null]), PropTypes.number, PropTypes.shape({
|
|
186
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
187
|
+
"description": PropTypes.string,
|
|
188
|
+
"toString": PropTypes.func.isRequired,
|
|
189
|
+
"valueOf": PropTypes.func.isRequired
|
|
190
|
+
}), PropTypes.string])), PropTypes.number, PropTypes.object, PropTypes.shape({
|
|
191
|
+
"__@toStringTag": PropTypes.string.isRequired,
|
|
192
|
+
"description": PropTypes.string,
|
|
193
|
+
"toString": PropTypes.func.isRequired,
|
|
194
|
+
"valueOf": PropTypes.func.isRequired
|
|
195
|
+
}), PropTypes.string])
|
|
55
196
|
};
|
|
56
197
|
export default Fieldset;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface StyledFieldsetProps {
|
|
2
|
+
/** When true, legend is placed in line with the children */
|
|
3
|
+
inline?: boolean;
|
|
4
|
+
}
|
|
5
|
+
declare const FieldsetStyle: import("styled-components").StyledComponent<"fieldset", any, {}, never>;
|
|
6
|
+
declare const LegendContainerStyle: import("styled-components").StyledComponent<"div", any, StyledFieldsetProps, never>;
|
|
7
|
+
declare const FieldsetContentStyle: import("styled-components").StyledComponent<"div", any, StyledFieldsetProps, never>;
|
|
8
|
+
export { FieldsetStyle, LegendContainerStyle, FieldsetContentStyle };
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { default } from "./fieldset";
|
|
1
|
+
export { default } from "./fieldset.component";
|
|
2
|
+
export type { FieldsetProps } from "./fieldset.component";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { PaddingProps, FlexboxProps } from "styled-system";
|
|
3
|
+
export interface GlobalHeaderProps extends PaddingProps, FlexboxProps {
|
|
4
|
+
/** Child elements */
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
/** Logo to render */
|
|
7
|
+
logo?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const GlobalHeader: {
|
|
10
|
+
({ children, logo, ...rest }: GlobalHeaderProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
export default GlobalHeader;
|