carbon-react 106.1.0 → 106.1.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/input-presentation.component.d.ts +2 -2
- package/esm/__internal__/validations/index.d.ts +1 -1
- package/esm/__internal__/validations/validation-icon.component.d.ts +50 -40
- package/esm/__internal__/validations/validation-icon.component.js +12 -64
- package/esm/__internal__/validations/validation-icon.style.d.ts +5 -1
- package/esm/__internal__/validations/validation-icon.style.js +0 -1
- package/esm/components/duelling-picklist/picklist-item/picklist-item.component.js +7 -3
- package/esm/components/icon/icon.d.ts +4 -0
- package/esm/components/link/link.style.js +4 -0
- package/esm/components/modal/modal.component.js +7 -1
- package/esm/components/pages/page/page.component.js +7 -3
- package/esm/components/popover-container/popover-container.component.js +5 -2
- package/esm/components/portal/portal.js +12 -8
- package/esm/components/select/simple-select/simple-select.component.js +1 -1
- package/esm/components/show-edit-pod/show-edit-pod.component.js +10 -4
- package/esm/components/toast/toast.component.js +6 -2
- package/esm/style/themes/base/base-theme.config.d.ts +78 -10
- package/esm/style/themes/sage/index.d.ts +78 -10
- package/lib/__internal__/input/input-presentation.component.d.ts +2 -2
- package/lib/__internal__/validations/index.d.ts +1 -1
- package/lib/__internal__/validations/validation-icon.component.d.ts +50 -40
- package/lib/__internal__/validations/validation-icon.component.js +13 -65
- package/lib/__internal__/validations/validation-icon.style.d.ts +5 -1
- package/lib/__internal__/validations/validation-icon.style.js +0 -1
- package/lib/components/duelling-picklist/picklist-item/picklist-item.component.js +6 -2
- package/lib/components/icon/icon.d.ts +4 -0
- package/lib/components/link/link.style.js +4 -0
- package/lib/components/modal/modal.component.js +7 -1
- package/lib/components/pages/page/page.component.js +11 -3
- package/lib/components/popover-container/popover-container.component.js +5 -2
- package/lib/components/portal/portal.js +15 -8
- package/lib/components/select/simple-select/simple-select.component.js +1 -1
- package/lib/components/show-edit-pod/show-edit-pod.component.js +10 -4
- package/lib/components/toast/toast.component.js +6 -2
- package/lib/style/themes/base/base-theme.config.d.ts +78 -10
- package/lib/style/themes/sage/index.d.ts +78 -10
- package/package.json +2 -2
- package/esm/__internal__/validations/validation-icon.d.ts +0 -38
- package/esm/__internal__/validations/validations.d.ts +0 -17
- package/lib/__internal__/validations/validation-icon.d.ts +0 -38
- package/lib/__internal__/validations/validations.d.ts +0 -17
|
@@ -3,13 +3,11 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.ValidationIcon = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
|
-
var
|
|
11
|
-
|
|
12
|
-
var _propTypes2 = _interopRequireDefault(require("@styled-system/prop-types"));
|
|
10
|
+
var _invariant = _interopRequireDefault(require("invariant"));
|
|
13
11
|
|
|
14
12
|
var _icon = _interopRequireDefault(require("../../components/icon"));
|
|
15
13
|
|
|
@@ -27,8 +25,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
27
25
|
|
|
28
26
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
27
|
|
|
30
|
-
const marginPropTypes = (0, _utils.filterStyledSystemMarginProps)(_propTypes2.default.space);
|
|
31
|
-
|
|
32
28
|
const getValidationType = ({
|
|
33
29
|
error,
|
|
34
30
|
warning,
|
|
@@ -37,7 +33,7 @@ const getValidationType = ({
|
|
|
37
33
|
if (error) return "error";
|
|
38
34
|
if (warning) return "warning";
|
|
39
35
|
if (info) return "info";
|
|
40
|
-
return
|
|
36
|
+
return null;
|
|
41
37
|
};
|
|
42
38
|
|
|
43
39
|
const ValidationIcon = ({
|
|
@@ -50,12 +46,18 @@ const ValidationIcon = ({
|
|
|
50
46
|
iconId,
|
|
51
47
|
tooltipId,
|
|
52
48
|
isPartOfInput,
|
|
53
|
-
tabIndex,
|
|
49
|
+
tabIndex = -1,
|
|
54
50
|
onClick,
|
|
55
|
-
tooltipPosition,
|
|
51
|
+
tooltipPosition = "right",
|
|
56
52
|
tooltipFlipOverrides,
|
|
57
53
|
...rest
|
|
58
54
|
}) => {
|
|
55
|
+
const flipBehaviourCheck = Array.isArray(tooltipFlipOverrides) && tooltipFlipOverrides.every(override => ["bottom", "left", "right", "top"].includes(override));
|
|
56
|
+
|
|
57
|
+
if (tooltipFlipOverrides) {
|
|
58
|
+
(0, _invariant.default)(flipBehaviourCheck, `The tooltipFlipOverrides prop supplied to ValidationIcon must be an array containing some or all of ["top", "bottom", "left", "right"].`);
|
|
59
|
+
}
|
|
60
|
+
|
|
59
61
|
const {
|
|
60
62
|
hasFocus,
|
|
61
63
|
hasMouseOver
|
|
@@ -72,7 +74,7 @@ const ValidationIcon = ({
|
|
|
72
74
|
});
|
|
73
75
|
const validationMessage = error || warning || info;
|
|
74
76
|
|
|
75
|
-
if (typeof validationMessage !== "string") {
|
|
77
|
+
if (typeof validationMessage !== "string" || !validationType) {
|
|
76
78
|
return null;
|
|
77
79
|
}
|
|
78
80
|
|
|
@@ -107,60 +109,6 @@ const ValidationIcon = ({
|
|
|
107
109
|
}));
|
|
108
110
|
};
|
|
109
111
|
|
|
110
|
-
ValidationIcon
|
|
111
|
-
|
|
112
|
-
/** A small string to indicate the size of the icon */
|
|
113
|
-
size: _propTypes.default.oneOf(["small", "medium", "large"]),
|
|
114
|
-
|
|
115
|
-
/** The unique id of the component (used with aria-describedby for accessibility) */
|
|
116
|
-
iconId: _propTypes.default.string,
|
|
117
|
-
|
|
118
|
-
/** Define position of the tooltip */
|
|
119
|
-
tooltipPosition: _propTypes.default.string,
|
|
120
|
-
|
|
121
|
-
/** Overrides the default flip behaviour of the Tooltip, must be an array containing some or all of ["top", "bottom", "left", "right"] (see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements) */
|
|
122
|
-
tooltipFlipOverrides: (props, propName, componentName) => {
|
|
123
|
-
const prop = props[propName];
|
|
124
|
-
const isValid = prop && Array.isArray(prop) && prop.every(placement => ["bottom", "left", "right", "top"].includes(placement));
|
|
125
|
-
|
|
126
|
-
if (!prop || isValid) {
|
|
127
|
-
return null;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return new Error( // eslint-disable-next-line max-len
|
|
131
|
-
`The \`${propName}\` prop supplied to \`${componentName}\` must be an array containing some or all of ["top", "bottom", "left", "right"].`);
|
|
132
|
-
},
|
|
133
|
-
|
|
134
|
-
/** Id passed to the tooltip container, used for accessibility purposes. */
|
|
135
|
-
tooltipId: _propTypes.default.string,
|
|
136
|
-
|
|
137
|
-
/** An onClick handler */
|
|
138
|
-
onClick: _propTypes.default.func,
|
|
139
|
-
|
|
140
|
-
/** An onFocus handler */
|
|
141
|
-
onFocus: _propTypes.default.func,
|
|
142
|
-
|
|
143
|
-
/** An onBlur handler */
|
|
144
|
-
onBlur: _propTypes.default.func,
|
|
145
|
-
|
|
146
|
-
/** A boolean to indicate if the icon is part of an input */
|
|
147
|
-
isPartOfInput: _propTypes.default.bool,
|
|
148
|
-
|
|
149
|
-
/** Overrides the default tabindex of the component */
|
|
150
|
-
tabIndex: _propTypes.default.number,
|
|
151
|
-
|
|
152
|
-
/** Status of error validations */
|
|
153
|
-
error: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
|
|
154
|
-
|
|
155
|
-
/** Status of warnings */
|
|
156
|
-
warning: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string]),
|
|
157
|
-
|
|
158
|
-
/** Status of info */
|
|
159
|
-
info: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.string])
|
|
160
|
-
};
|
|
161
|
-
ValidationIcon.defaultProps = {
|
|
162
|
-
tooltipPosition: "right",
|
|
163
|
-
tabIndex: -1
|
|
164
|
-
};
|
|
112
|
+
exports.ValidationIcon = ValidationIcon;
|
|
165
113
|
var _default = ValidationIcon;
|
|
166
114
|
exports.default = _default;
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
+
import { ValidationIconProps } from "./validation-icon.component";
|
|
2
|
+
declare type ValidationType = "error" | "warning" | "info";
|
|
3
|
+
declare const ValidationIconStyle: import("styled-components").StyledComponent<"span", any, ValidationIconProps & {
|
|
4
|
+
validationType: ValidationType;
|
|
5
|
+
}, never>;
|
|
1
6
|
export default ValidationIconStyle;
|
|
2
|
-
declare const ValidationIconStyle: import("styled-components").StyledComponent<"span", any, {}, never>;
|
|
@@ -22,7 +22,6 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
|
|
|
22
22
|
const validationIconTypes = {
|
|
23
23
|
error: "var(--colorsSemanticNegative500)",
|
|
24
24
|
info: "var(--colorsSemanticInfo500)",
|
|
25
|
-
success: "var(--colorsSemanticPositive500)",
|
|
26
25
|
warning: "var(--colorsSemanticCaution500)"
|
|
27
26
|
};
|
|
28
27
|
const ValidationIconStyle = _styledComponents.default.span`
|
|
@@ -44,6 +44,7 @@ const PicklistItem = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
44
44
|
const {
|
|
45
45
|
setElementToFocus
|
|
46
46
|
} = (0, _react.useContext)(_duellingPicklist.default);
|
|
47
|
+
const picklistItemNodeRef = (0, _react.useRef)();
|
|
47
48
|
const calculateFocusIndex = (0, _react.useCallback)(() => {
|
|
48
49
|
if (isLastItem) {
|
|
49
50
|
const toggledListIndex = listIndex === 0 ? 1 : 0;
|
|
@@ -89,10 +90,13 @@ const PicklistItem = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
89
90
|
classNames: "picklist-item"
|
|
90
91
|
}, rest, type === "add" ? {
|
|
91
92
|
enter: false
|
|
92
|
-
} : {}
|
|
93
|
+
} : {}, {
|
|
94
|
+
nodeRef: picklistItemNodeRef
|
|
95
|
+
}), /*#__PURE__*/_react.default.createElement(_picklistItem.StyledPicklistItem, {
|
|
93
96
|
onKeyDown: handleKeydown,
|
|
94
97
|
"data-element": "picklist-item",
|
|
95
|
-
locked: locked
|
|
98
|
+
locked: locked,
|
|
99
|
+
ref: picklistItemNodeRef
|
|
96
100
|
}, children, !locked && /*#__PURE__*/_react.default.createElement(_picklistItem.StyledButton, {
|
|
97
101
|
buttonType: "primary",
|
|
98
102
|
destructive: type === "remove",
|
|
@@ -239,6 +239,10 @@ export interface IconProps extends MarginProps {
|
|
|
239
239
|
tooltipId?: string;
|
|
240
240
|
/** Id passed to the icon. */
|
|
241
241
|
id?: string;
|
|
242
|
+
tabIndex?: number;
|
|
243
|
+
isPartOfInput?: boolean;
|
|
244
|
+
inputSize?: "small" | "medium" | "large";
|
|
245
|
+
focusable?: boolean;
|
|
242
246
|
}
|
|
243
247
|
|
|
244
248
|
declare function Icon(
|
|
@@ -67,6 +67,10 @@ const StyledLink = _styledComponents.default.span`
|
|
|
67
67
|
&:hover {
|
|
68
68
|
cursor: pointer;
|
|
69
69
|
color: ${isSkipLink ? "var(--colorsUtilityYin090)" : "var(--colorsActionMajor600)"};
|
|
70
|
+
|
|
71
|
+
${_icon.default} {
|
|
72
|
+
color: var(--colorsActionMajor600);
|
|
73
|
+
}
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
&:focus {
|
|
@@ -44,6 +44,8 @@ const Modal = ({
|
|
|
44
44
|
...rest
|
|
45
45
|
}) => {
|
|
46
46
|
const ref = (0, _react.useRef)();
|
|
47
|
+
const backgroundNodeRef = (0, _react.useRef)();
|
|
48
|
+
const contentNodeRef = (0, _react.useRef)();
|
|
47
49
|
const listenerAdded = (0, _react.useRef)(false);
|
|
48
50
|
const modalRegistered = (0, _react.useRef)(false);
|
|
49
51
|
const [isAnimationComplete, setAnimationComplete] = (0, _react.useState)(false);
|
|
@@ -139,6 +141,7 @@ const Modal = ({
|
|
|
139
141
|
|
|
140
142
|
if (open) {
|
|
141
143
|
background = !enableBackgroundUI ? /*#__PURE__*/_react.default.createElement(_modal.StyledModalBackground, {
|
|
144
|
+
ref: backgroundNodeRef,
|
|
142
145
|
"data-element": "modal-background",
|
|
143
146
|
transitionName: "modal-background",
|
|
144
147
|
transitionTime: timeout
|
|
@@ -152,6 +155,7 @@ const Modal = ({
|
|
|
152
155
|
transitionTime: timeout,
|
|
153
156
|
ref: ref
|
|
154
157
|
}, rest), /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.TransitionGroup, null, background && /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
158
|
+
nodeRef: backgroundNodeRef,
|
|
155
159
|
key: "modal",
|
|
156
160
|
appear: true,
|
|
157
161
|
classNames: "modal-background",
|
|
@@ -159,6 +163,7 @@ const Modal = ({
|
|
|
159
163
|
onEntered: () => setAnimationComplete(true),
|
|
160
164
|
onExiting: () => setAnimationComplete(false)
|
|
161
165
|
}, background)), /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.TransitionGroup, null, content && /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, {
|
|
166
|
+
nodeRef: contentNodeRef,
|
|
162
167
|
appear: true,
|
|
163
168
|
classNames: "modal",
|
|
164
169
|
timeout: timeout
|
|
@@ -167,7 +172,8 @@ const Modal = ({
|
|
|
167
172
|
isAnimationComplete,
|
|
168
173
|
triggerRefocusFlag,
|
|
169
174
|
isInModal: true
|
|
170
|
-
}
|
|
175
|
+
},
|
|
176
|
+
ref: contentNodeRef
|
|
171
177
|
}, content)))));
|
|
172
178
|
};
|
|
173
179
|
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
@@ -21,6 +21,10 @@ var _page = require("./page.style");
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
|
25
|
+
|
|
26
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
+
|
|
24
28
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
29
|
|
|
26
30
|
const Page = ({
|
|
@@ -28,6 +32,7 @@ const Page = ({
|
|
|
28
32
|
children,
|
|
29
33
|
...props
|
|
30
34
|
}) => {
|
|
35
|
+
const styledPageNodeRef = (0, _react.useRef)();
|
|
31
36
|
return /*#__PURE__*/_react.default.createElement(_reactTransitionGroup.CSSTransition, _extends({
|
|
32
37
|
className: "carbon-carousel__transition",
|
|
33
38
|
timeout: {
|
|
@@ -36,8 +41,11 @@ const Page = ({
|
|
|
36
41
|
exit: 0
|
|
37
42
|
} // eslint-disable-next-line react/prop-types
|
|
38
43
|
,
|
|
39
|
-
classNames: props.transitionName()
|
|
40
|
-
|
|
44
|
+
classNames: props.transitionName(),
|
|
45
|
+
nodeRef: styledPageNodeRef
|
|
46
|
+
}, props), /*#__PURE__*/_react.default.createElement(_page.StyledPage, _extends({}, (0, _tags.default)("page", props), {
|
|
47
|
+
ref: styledPageNodeRef
|
|
48
|
+
}), /*#__PURE__*/_react.default.createElement(_fullScreenHeading.default, {
|
|
41
49
|
hasContent: title
|
|
42
50
|
}, title), /*#__PURE__*/_react.default.createElement(_page.StyledPageContent, {
|
|
43
51
|
"data-element": "carbon-page-content"
|
|
@@ -52,6 +52,7 @@ const PopoverContainer = ({
|
|
|
52
52
|
const closeButtonRef = (0, _react.useRef)();
|
|
53
53
|
const openButtonRef = (0, _react.useRef)();
|
|
54
54
|
const guid = (0, _react.useRef)((0, _guid.default)());
|
|
55
|
+
const popoverContentNodeRef = (0, _react.useRef)();
|
|
55
56
|
const popoverContainerId = title ? `PopoverContainer_${guid.current}` : undefined;
|
|
56
57
|
const isOpen = isControlled ? open : isOpenInternal;
|
|
57
58
|
(0, _react.useEffect)(() => {
|
|
@@ -99,7 +100,8 @@ const PopoverContainer = ({
|
|
|
99
100
|
},
|
|
100
101
|
appear: true,
|
|
101
102
|
mountOnEnter: true,
|
|
102
|
-
unmountOnExit: true
|
|
103
|
+
unmountOnExit: true,
|
|
104
|
+
nodeRef: popoverContentNodeRef
|
|
103
105
|
}, state => /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerContentStyle, _extends({
|
|
104
106
|
"data-element": "popover-container-content",
|
|
105
107
|
role: "dialog",
|
|
@@ -109,7 +111,8 @@ const PopoverContainer = ({
|
|
|
109
111
|
"aria-labelledby": popoverContainerId,
|
|
110
112
|
"aria-label": containerAriaLabel,
|
|
111
113
|
"aria-describedby": ariaDescribedBy,
|
|
112
|
-
p: "16px 24px"
|
|
114
|
+
p: "16px 24px",
|
|
115
|
+
ref: popoverContentNodeRef
|
|
113
116
|
}, (0, _utils.filterStyledSystemPaddingProps)(rest)), /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerHeaderStyle, null, /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerTitleStyle, {
|
|
114
117
|
id: popoverContainerId,
|
|
115
118
|
"data-element": "popover-container-title"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = void 0;
|
|
6
|
+
exports.default = exports.PortalContext = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
9
|
|
|
@@ -23,6 +23,10 @@ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return
|
|
|
23
23
|
|
|
24
24
|
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25
25
|
|
|
26
|
+
const PortalContext = /*#__PURE__*/_react.default.createContext({});
|
|
27
|
+
|
|
28
|
+
exports.PortalContext = PortalContext;
|
|
29
|
+
|
|
26
30
|
const Portal = ({
|
|
27
31
|
children,
|
|
28
32
|
className,
|
|
@@ -31,6 +35,9 @@ const Portal = ({
|
|
|
31
35
|
}) => {
|
|
32
36
|
const [portalNode, setPortalNode] = (0, _react.useState)(null);
|
|
33
37
|
const uniqueId = (0, _react.useMemo)(() => (0, _guid.default)(), []);
|
|
38
|
+
const {
|
|
39
|
+
renderInRoot
|
|
40
|
+
} = (0, _react.useContext)(PortalContext);
|
|
34
41
|
(0, _react.useEffect)(() => {
|
|
35
42
|
if (onReposition) {
|
|
36
43
|
onReposition();
|
|
@@ -63,7 +70,7 @@ const Portal = ({
|
|
|
63
70
|
if (!node && id !== undefined && document.getElementById(id)) {
|
|
64
71
|
node = document.getElementById(id);
|
|
65
72
|
setPortalNode(node);
|
|
66
|
-
} else if (!node) {
|
|
73
|
+
} else if (!node || document.getElementsByClassName(portalClassName).length === 0) {
|
|
67
74
|
node = document.createElement("div");
|
|
68
75
|
node.classList.add(portalClassName);
|
|
69
76
|
node.setAttribute("data-portal-exit", uniqueId);
|
|
@@ -73,14 +80,14 @@ const Portal = ({
|
|
|
73
80
|
}
|
|
74
81
|
|
|
75
82
|
setPortalNode(node);
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
let mainNode = document.body;
|
|
84
|
+
const rootDiv = document.getElementById("root");
|
|
78
85
|
|
|
79
|
-
if (rootDiv &&
|
|
80
|
-
rootDiv
|
|
81
|
-
} else {
|
|
82
|
-
document.body.appendChild(node);
|
|
86
|
+
if (rootDiv && renderInRoot) {
|
|
87
|
+
mainNode = rootDiv;
|
|
83
88
|
}
|
|
89
|
+
|
|
90
|
+
mainNode.appendChild(node);
|
|
84
91
|
}
|
|
85
92
|
|
|
86
93
|
if (className) {
|
|
@@ -154,7 +154,7 @@ const SimpleSelect = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
154
154
|
|
|
155
155
|
return true;
|
|
156
156
|
});
|
|
157
|
-
} else if (key.length === 1) {
|
|
157
|
+
} else if (key.length === 1 && !event.metaKey && !event.ctrlKey) {
|
|
158
158
|
triggerFilterChange(key);
|
|
159
159
|
}
|
|
160
160
|
}, [triggerFilterChange, onKeyDown, onOpen, readOnly]);
|
|
@@ -61,6 +61,8 @@ const ShowEditPod = ({
|
|
|
61
61
|
}) => {
|
|
62
62
|
const locale = (0, _react.useContext)(_i18nContext.default);
|
|
63
63
|
const ref = (0, _react.useRef)();
|
|
64
|
+
const editModeNodeRef = (0, _react.useRef)();
|
|
65
|
+
const showModeNodeRef = (0, _react.useRef)();
|
|
64
66
|
const [isEditing, setIsEditingState] = (0, _react.useState)(false);
|
|
65
67
|
const isControlled = editing !== undefined;
|
|
66
68
|
|
|
@@ -146,9 +148,11 @@ const ShowEditPod = ({
|
|
|
146
148
|
timeout: {
|
|
147
149
|
enter: 300,
|
|
148
150
|
exit: 50
|
|
149
|
-
}
|
|
151
|
+
},
|
|
152
|
+
nodeRef: editModeNodeRef
|
|
150
153
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
151
|
-
key: "edit"
|
|
154
|
+
key: "edit",
|
|
155
|
+
ref: editModeNodeRef
|
|
152
156
|
}, editContent()));
|
|
153
157
|
}
|
|
154
158
|
|
|
@@ -158,9 +162,11 @@ const ShowEditPod = ({
|
|
|
158
162
|
timeout: {
|
|
159
163
|
enter: 300,
|
|
160
164
|
exit: 50
|
|
161
|
-
}
|
|
165
|
+
},
|
|
166
|
+
nodeRef: showModeNodeRef
|
|
162
167
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
163
|
-
key: "show"
|
|
168
|
+
key: "show",
|
|
169
|
+
ref: showModeNodeRef
|
|
164
170
|
}, children));
|
|
165
171
|
};
|
|
166
172
|
|
|
@@ -63,6 +63,7 @@ const Toast = ({
|
|
|
63
63
|
const locale = (0, _useLocale.default)();
|
|
64
64
|
const toastRef = (0, _react.useRef)();
|
|
65
65
|
const timer = (0, _react.useRef)();
|
|
66
|
+
const toastContentNodeRef = (0, _react.useRef)();
|
|
66
67
|
const componentClasses = (0, _react.useMemo)(() => {
|
|
67
68
|
return (0, _classnames.default)(className);
|
|
68
69
|
}, [className]);
|
|
@@ -122,10 +123,13 @@ const Toast = ({
|
|
|
122
123
|
appear: 1600,
|
|
123
124
|
enter: 1500,
|
|
124
125
|
exit: 500
|
|
125
|
-
}
|
|
126
|
+
},
|
|
127
|
+
nodeRef: toastContentNodeRef
|
|
126
128
|
}, /*#__PURE__*/_react.default.createElement(_toast.ToastStyle, _extends({
|
|
127
129
|
className: componentClasses
|
|
128
|
-
}, (0, _tags.default)(restProps["data-component"] || "toast", restProps), toastProps
|
|
130
|
+
}, (0, _tags.default)(restProps["data-component"] || "toast", restProps), toastProps, {
|
|
131
|
+
ref: toastContentNodeRef
|
|
132
|
+
}), /*#__PURE__*/_react.default.createElement(_toast.TypeIcon, {
|
|
129
133
|
variant: toastProps.variant
|
|
130
134
|
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
131
135
|
type: toastProps.variant
|
|
@@ -56,6 +56,9 @@ declare function _default(palette: any): {
|
|
|
56
56
|
colorsYang100: string;
|
|
57
57
|
colorsYang030: string;
|
|
58
58
|
colorsYang080: string;
|
|
59
|
+
colorsGray600: string;
|
|
60
|
+
colorsGray700: string;
|
|
61
|
+
colorsGray750: string;
|
|
59
62
|
colorsGray850: string;
|
|
60
63
|
colorsGray900: string;
|
|
61
64
|
colorsGray1000: string;
|
|
@@ -75,19 +78,31 @@ declare function _default(palette: any): {
|
|
|
75
78
|
colorsComponentsMenuSpringChild400: string;
|
|
76
79
|
colorsComponentsMenuSpringChild500: string;
|
|
77
80
|
colorsComponentsMenuSpringChild600: string;
|
|
81
|
+
colorsComponentsMenuSpringChildAlt400: string;
|
|
78
82
|
colorsComponentsMenuSpringChildAlt500: string;
|
|
79
83
|
colorsComponentsMenuSpringChildAlt600: string;
|
|
84
|
+
colorsComponentsMenuSummerStandard400: string;
|
|
80
85
|
colorsComponentsMenuSummerStandard500: string;
|
|
81
86
|
colorsComponentsMenuSummerStandard600: string;
|
|
82
87
|
colorsComponentsMenuSummerStandard700: string;
|
|
88
|
+
colorsComponentsMenuSummerStandard800: string;
|
|
89
|
+
colorsComponentsMenuSummerParent400: string;
|
|
83
90
|
colorsComponentsMenuSummerParent500: string;
|
|
84
91
|
colorsComponentsMenuSummerParent600: string;
|
|
85
92
|
colorsComponentsMenuSummerParent700: string;
|
|
93
|
+
colorsComponentsMenuSummerParent800: string;
|
|
94
|
+
colorsComponentsMenuSummerChild300: string;
|
|
86
95
|
colorsComponentsMenuSummerChild400: string;
|
|
87
96
|
colorsComponentsMenuSummerChild500: string;
|
|
88
97
|
colorsComponentsMenuSummerChild600: string;
|
|
98
|
+
colorsComponentsMenuSummerChild700: string;
|
|
99
|
+
colorsComponentsMenuSummerChild800: string;
|
|
100
|
+
colorsComponentsMenuSummerChildAlt300: string;
|
|
101
|
+
colorsComponentsMenuSummerChildAlt400: string;
|
|
89
102
|
colorsComponentsMenuSummerChildAlt500: string;
|
|
90
103
|
colorsComponentsMenuSummerChildAlt600: string;
|
|
104
|
+
colorsComponentsMenuSummerChildAlt700: string;
|
|
105
|
+
colorsComponentsMenuSummerChildAlt800: string;
|
|
91
106
|
colorsComponentsMenuAutumnStandard500: string;
|
|
92
107
|
colorsComponentsMenuAutumnStandard600: string;
|
|
93
108
|
colorsComponentsMenuAutumnStandard700: string;
|
|
@@ -97,24 +112,37 @@ declare function _default(palette: any): {
|
|
|
97
112
|
colorsComponentsMenuAutumnChild400: string;
|
|
98
113
|
colorsComponentsMenuAutumnChild500: string;
|
|
99
114
|
colorsComponentsMenuAutumnChild600: string;
|
|
115
|
+
colorsComponentsMenuAutumnChildAlt400: string;
|
|
100
116
|
colorsComponentsMenuAutumnChildAlt500: string;
|
|
101
117
|
colorsComponentsMenuAutumnChildAlt600: string;
|
|
118
|
+
colorsComponentsMenuWinterStandard400: string;
|
|
102
119
|
colorsComponentsMenuWinterStandard500: string;
|
|
103
120
|
colorsComponentsMenuWinterStandard600: string;
|
|
104
121
|
colorsComponentsMenuWinterStandard700: string;
|
|
122
|
+
colorsComponentsMenuWinterStandard800: string;
|
|
123
|
+
colorsComponentsMenuWinterParent400: string;
|
|
105
124
|
colorsComponentsMenuWinterParent500: string;
|
|
106
125
|
colorsComponentsMenuWinterParent600: string;
|
|
107
126
|
colorsComponentsMenuWinterParent700: string;
|
|
127
|
+
colorsComponentsMenuWinterParent800: string;
|
|
128
|
+
colorsComponentsMenuWinterChild300: string;
|
|
108
129
|
colorsComponentsMenuWinterChild400: string;
|
|
109
130
|
colorsComponentsMenuWinterChild500: string;
|
|
110
131
|
colorsComponentsMenuWinterChild600: string;
|
|
132
|
+
colorsComponentsMenuWinterChild700: string;
|
|
133
|
+
colorsComponentsMenuWinterChild800: string;
|
|
134
|
+
colorsComponentsMenuWinterChildAlt300: string;
|
|
135
|
+
colorsComponentsMenuWinterChildAlt400: string;
|
|
111
136
|
colorsComponentsMenuWinterChildAlt500: string;
|
|
112
137
|
colorsComponentsMenuWinterChildAlt600: string;
|
|
138
|
+
colorsComponentsMenuWinterChildAlt700: string;
|
|
139
|
+
colorsComponentsMenuWinterChildAlt800: string;
|
|
113
140
|
colorsComponentsMenuYin100: string;
|
|
114
141
|
colorsComponentsMenuYin065: string;
|
|
115
142
|
colorsComponentsMenuYin090: string;
|
|
116
143
|
colorsComponentsMenuYang100: string;
|
|
117
144
|
colorsComponentsMenuYang080: string;
|
|
145
|
+
colorsComponentsMenuTransparent: string;
|
|
118
146
|
colorsUtilityMajor100: string;
|
|
119
147
|
colorsUtilityMajor150: string;
|
|
120
148
|
colorsUtilityMajor200: string;
|
|
@@ -229,6 +257,7 @@ declare function _default(palette: any): {
|
|
|
229
257
|
sizing400: string;
|
|
230
258
|
sizing450: string;
|
|
231
259
|
sizing500: string;
|
|
260
|
+
sizing525: string;
|
|
232
261
|
sizing600: string;
|
|
233
262
|
sizing700: string;
|
|
234
263
|
sizing800: string;
|
|
@@ -236,12 +265,13 @@ declare function _default(palette: any): {
|
|
|
236
265
|
sizing1000: string;
|
|
237
266
|
sizing1300: string;
|
|
238
267
|
sizing1600: string;
|
|
268
|
+
sizing010: string;
|
|
239
269
|
sizing025: string;
|
|
240
270
|
sizing050: string;
|
|
241
271
|
sizing075: string;
|
|
242
272
|
sizingLogowidth: string;
|
|
243
|
-
sizing010: string;
|
|
244
273
|
spacing100: string;
|
|
274
|
+
spacing110: string;
|
|
245
275
|
spacing125: string;
|
|
246
276
|
spacing150: string;
|
|
247
277
|
spacing200: string;
|
|
@@ -255,8 +285,10 @@ declare function _default(palette: any): {
|
|
|
255
285
|
spacing900: string;
|
|
256
286
|
spacing1000: string;
|
|
257
287
|
spacing000: string;
|
|
288
|
+
spacing010: string;
|
|
258
289
|
spacing025: string;
|
|
259
290
|
spacing050: string;
|
|
291
|
+
spacing060: string;
|
|
260
292
|
spacing075: string;
|
|
261
293
|
borderWidth100: string;
|
|
262
294
|
borderWidth200: string;
|
|
@@ -281,8 +313,11 @@ declare function _default(palette: any): {
|
|
|
281
313
|
boxShadow200: string;
|
|
282
314
|
boxShadow300: string;
|
|
283
315
|
boxShadow400: string;
|
|
284
|
-
|
|
316
|
+
boxShadow010: string;
|
|
285
317
|
boxShadow050: string;
|
|
318
|
+
boxShadow075: string;
|
|
319
|
+
boxShadow090: string;
|
|
320
|
+
boxShadow091: string;
|
|
286
321
|
fontWeights400: string;
|
|
287
322
|
fontWeights500: string;
|
|
288
323
|
fontWeights700: string;
|
|
@@ -303,14 +338,29 @@ declare function _default(palette: any): {
|
|
|
303
338
|
typographyButtonLabelS: string;
|
|
304
339
|
typographyButtonLabelM: string;
|
|
305
340
|
typographyButtonLabelL: string;
|
|
341
|
+
typographyCardParagraphM: string;
|
|
306
342
|
typographyCardSelectTitleM: string;
|
|
307
343
|
typographyCardSelectSubtitleM: string;
|
|
308
344
|
typographyCardSelectParagraphM: string;
|
|
309
345
|
typographyDatePickerCalendarDateM: string;
|
|
310
346
|
typographyDatePickerCalendarDayM: string;
|
|
311
347
|
typographyDatePickerCalendarMonthM: string;
|
|
348
|
+
typographyDialogTitleXs: string;
|
|
349
|
+
typographyDialogTitleS: string;
|
|
350
|
+
typographyDialogTitleMs: string;
|
|
312
351
|
typographyDialogTitleM: string;
|
|
352
|
+
typographyDialogTitleMl: string;
|
|
353
|
+
typographyDialogTitleL: string;
|
|
354
|
+
typographyDialogTitleXl: string;
|
|
355
|
+
typographyDialogTitleXxl: string;
|
|
356
|
+
typographyDialogParagraphXs: string;
|
|
357
|
+
typographyDialogParagraphS: string;
|
|
358
|
+
typographyDialogParagraphMs: string;
|
|
313
359
|
typographyDialogParagraphM: string;
|
|
360
|
+
typographyDialogParagraphMl: string;
|
|
361
|
+
typographyDialogParagraphL: string;
|
|
362
|
+
typographyDialogParagraphXl: string;
|
|
363
|
+
typographyDialogParagraphXxl: string;
|
|
314
364
|
typographyDrawerTitleM: string;
|
|
315
365
|
typographyDrawerParagraphM: string;
|
|
316
366
|
typographyFlashTextM: string;
|
|
@@ -351,24 +401,31 @@ declare function _default(palette: any): {
|
|
|
351
401
|
typographyLinkTextM: string;
|
|
352
402
|
typographyLinkTextL: string;
|
|
353
403
|
typographyMenuLabelM: string;
|
|
404
|
+
typographyMenuLabelL: string;
|
|
354
405
|
typographyMenuSegmentTitleM: string;
|
|
355
406
|
typographyMessageHeadingM: string;
|
|
356
407
|
typographyMessageHeadingL: string;
|
|
357
408
|
typographyMessageTextM: string;
|
|
358
409
|
typographyMessageTextL: string;
|
|
359
410
|
typographyPaginationLabelM: string;
|
|
360
|
-
typographyTileParagraphM: string;
|
|
361
411
|
typographyPillLabelS: string;
|
|
362
412
|
typographyPillLabelM: string;
|
|
363
413
|
typographyPillLabelL: string;
|
|
364
414
|
typographyPillLabelXl: string;
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
415
|
+
typographyProfileEmailTextXs: string;
|
|
416
|
+
typographyProfileEmailTextS: string;
|
|
417
|
+
typographyProfileEmailTextM: string;
|
|
418
|
+
typographyProfileEmailTextMl: string;
|
|
419
|
+
typographyProfileEmailTextL: string;
|
|
420
|
+
typographyProfileEmailTextXl: string;
|
|
421
|
+
typographyProfileEmailTextXxl: string;
|
|
422
|
+
typographyProfileEmailLinkXs: string;
|
|
423
|
+
typographyProfileEmailLinkS: string;
|
|
424
|
+
typographyProfileEmailLinkM: string;
|
|
425
|
+
typographyProfileEmailLinkMl: string;
|
|
426
|
+
typographyProfileEmailLinkL: string;
|
|
427
|
+
typographyProfileEmailLinkXl: string;
|
|
428
|
+
typographyProfileEmailLinkXxl: string;
|
|
372
429
|
typographyProfileInitialsXs: string;
|
|
373
430
|
typographyProfileInitialsS: string;
|
|
374
431
|
typographyProfileInitialsM: string;
|
|
@@ -387,10 +444,20 @@ declare function _default(palette: any): {
|
|
|
387
444
|
typographyProgressTrackerValueLabelM: string;
|
|
388
445
|
typographyProgressTrackerValueLabelL: string;
|
|
389
446
|
typographySearchLabelM: string;
|
|
447
|
+
typographySidebarTitleXs: string;
|
|
390
448
|
typographySidebarTitleS: string;
|
|
449
|
+
typographySidebarTitleMs: string;
|
|
391
450
|
typographySidebarTitleM: string;
|
|
451
|
+
typographySidebarTitleMl: string;
|
|
392
452
|
typographySidebarTitleL: string;
|
|
453
|
+
typographySidebarTitleXl: string;
|
|
454
|
+
typographySidebarParagraphXs: string;
|
|
455
|
+
typographySidebarParagraphS: string;
|
|
456
|
+
typographySidebarParagraphMs: string;
|
|
393
457
|
typographySidebarParagraphM: string;
|
|
458
|
+
typographySidebarParagraphMl: string;
|
|
459
|
+
typographySidebarParagraphL: string;
|
|
460
|
+
typographySidebarParagraphXl: string;
|
|
394
461
|
typographyStepFlowCompleteLabelM: string;
|
|
395
462
|
typographyStepFlowCurrentLabelM: string;
|
|
396
463
|
typographyStepFlowIncompleteLabelM: string;
|
|
@@ -406,6 +473,7 @@ declare function _default(palette: any): {
|
|
|
406
473
|
typographyTableCellTextM: string;
|
|
407
474
|
typographyTableCellTextL: string;
|
|
408
475
|
typographyTableCellTextXl: string;
|
|
476
|
+
typographyTileParagraphM: string;
|
|
409
477
|
typographyTooltipTextM: string;
|
|
410
478
|
typographyTooltipTextL: string;
|
|
411
479
|
opacity300: string;
|