carbon-react 106.3.1 → 106.3.2
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.js +13 -0
- package/esm/__internal__/input/input.component.js +294 -0
- package/esm/__internal__/input-behaviour/input-behaviour.component.js +4 -0
- package/esm/__internal__/input-behaviour/input-group-behaviour.component.js +5 -0
- package/esm/__internal__/validation-message/validation-message.component.js +5 -0
- package/esm/__internal__/validations/validation-icon.component.js +41 -1
- package/esm/components/alert/alert.component.js +38 -252
- package/esm/components/alert/index.d.ts +1 -0
- package/esm/components/badge/badge.component.js +20 -60
- package/esm/components/button/button.component.js +760 -3310
- package/esm/components/carbon-provider/carbon-provider.component.js +48 -106
- package/esm/components/heading/heading.style.d.ts +2 -2
- package/esm/components/hr/hr.component.js +171 -1305
- package/esm/components/hr/index.d.ts +1 -0
- package/esm/components/inline-inputs/inline-inputs.component.js +35 -90
- package/esm/components/link/index.d.ts +1 -0
- package/esm/components/link/link.component.js +123 -1228
- package/esm/components/navigation-bar/index.d.ts +1 -0
- package/esm/components/navigation-bar/navigation-bar.component.js +1018 -10761
- package/esm/components/pager/pager.style.d.ts +1 -1
- package/esm/components/pod/pod.style.d.ts +1 -1
- package/esm/components/radio-button/radio-button-svg.component.js +16 -29
- package/esm/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -1
- package/esm/components/tooltip/tooltip.component.js +85 -254
- package/esm/components/vertical-divider/index.d.ts +1 -0
- package/esm/components/vertical-divider/vertical-divider.component.d.ts +2 -2
- package/esm/components/vertical-divider/vertical-divider.component.js +328 -1406
- package/esm/components/vertical-divider/vertical-divider.style.d.ts +3 -3
- package/lib/__internal__/input/input-presentation.component.js +16 -0
- package/lib/__internal__/input/input.component.js +295 -0
- package/lib/__internal__/input-behaviour/input-behaviour.component.js +6 -1
- package/lib/__internal__/input-behaviour/input-group-behaviour.component.js +7 -1
- package/lib/__internal__/validation-message/validation-message.component.js +6 -0
- package/lib/__internal__/validations/validation-icon.component.js +39 -0
- package/lib/components/alert/alert.component.js +42 -143
- package/lib/components/alert/index.d.ts +1 -0
- package/lib/components/badge/badge.component.js +24 -50
- package/lib/components/button/button.component.js +768 -3378
- package/lib/components/carbon-provider/carbon-provider.component.js +54 -110
- package/lib/components/heading/heading.style.d.ts +2 -2
- package/lib/components/hr/hr.component.js +175 -676
- package/lib/components/hr/index.d.ts +1 -0
- package/lib/components/inline-inputs/inline-inputs.component.js +43 -137
- package/lib/components/link/index.d.ts +1 -0
- package/lib/components/link/link.component.js +142 -746
- package/lib/components/navigation-bar/index.d.ts +1 -0
- package/lib/components/navigation-bar/navigation-bar.component.js +1022 -5426
- package/lib/components/pager/pager.style.d.ts +1 -1
- package/lib/components/pod/pod.style.d.ts +1 -1
- package/lib/components/radio-button/radio-button-svg.component.js +20 -38
- package/lib/components/text-editor/__internal__/editor-link/editor-link.style.d.ts +1 -1
- package/lib/components/tooltip/tooltip.component.js +98 -215
- package/lib/components/vertical-divider/index.d.ts +1 -0
- package/lib/components/vertical-divider/vertical-divider.component.d.ts +2 -2
- package/lib/components/vertical-divider/vertical-divider.component.js +334 -1457
- package/lib/components/vertical-divider/vertical-divider.style.d.ts +3 -3
- package/package.json +4 -3
|
@@ -3,7 +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<import("react").ForwardRefExoticComponent<import("../link
|
|
6
|
+
export const StyledPagerLinkStyles: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../link").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>;
|
|
@@ -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<import("react").ForwardRefExoticComponent<import("../link
|
|
3
|
+
export const StyledEditAction: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../link").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>;
|
|
@@ -1,52 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
exports.default = void 0;
|
|
8
7
|
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
9
|
|
|
12
|
-
var _checkableInputSvgWrapper = _interopRequireDefault(
|
|
13
|
-
require("../../__internal__/checkable-input/checkable-input-svg-wrapper.style")
|
|
14
|
-
);
|
|
10
|
+
var _checkableInputSvgWrapper = _interopRequireDefault(require("../../__internal__/checkable-input/checkable-input-svg-wrapper.style"));
|
|
15
11
|
|
|
16
|
-
function _interopRequireDefault(obj) {
|
|
17
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
18
|
-
}
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
13
|
|
|
20
14
|
const RadioButtonSvg = () => {
|
|
21
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
fillRule: "evenodd",
|
|
37
|
-
},
|
|
38
|
-
/*#__PURE__*/ _react.default.createElement("circle", {
|
|
39
|
-
className: "radio-button-check",
|
|
40
|
-
fill: "#FFFFFF",
|
|
41
|
-
cx: "7.5",
|
|
42
|
-
cy: "7.5",
|
|
43
|
-
r: "5",
|
|
44
|
-
})
|
|
45
|
-
)
|
|
46
|
-
)
|
|
47
|
-
);
|
|
15
|
+
return /*#__PURE__*/_react.default.createElement(_checkableInputSvgWrapper.default, null, /*#__PURE__*/_react.default.createElement("svg", {
|
|
16
|
+
focusable: "false",
|
|
17
|
+
viewBox: "0 0 15 15"
|
|
18
|
+
}, /*#__PURE__*/_react.default.createElement("g", {
|
|
19
|
+
stroke: "none",
|
|
20
|
+
strokeWidth: "1",
|
|
21
|
+
fill: "none",
|
|
22
|
+
fillRule: "evenodd"
|
|
23
|
+
}, /*#__PURE__*/_react.default.createElement("circle", {
|
|
24
|
+
className: "radio-button-check",
|
|
25
|
+
fill: "#FFFFFF",
|
|
26
|
+
cx: "7.5",
|
|
27
|
+
cy: "7.5",
|
|
28
|
+
r: "5"
|
|
29
|
+
}))));
|
|
48
30
|
};
|
|
49
31
|
|
|
50
|
-
var _default = /*#__PURE__*/
|
|
32
|
+
var _default = /*#__PURE__*/_react.default.memo(RadioButtonSvg, () => true);
|
|
51
33
|
|
|
52
|
-
exports.default = _default;
|
|
34
|
+
exports.default = _default;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export default StyledEditorLink;
|
|
2
|
-
declare const StyledEditorLink: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../link
|
|
2
|
+
declare const StyledEditorLink: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<import("../../../link").LinkProps & import("react").RefAttributes<HTMLLinkElement | HTMLButtonElement>>, any, {}, never>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
4
|
+
value: true
|
|
5
5
|
});
|
|
6
|
-
|
|
7
6
|
exports.default = exports.Tooltip = void 0;
|
|
8
7
|
|
|
9
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
|
|
12
12
|
var _headless = _interopRequireDefault(require("@tippyjs/react/headless"));
|
|
@@ -17,233 +17,116 @@ var _invariant = _interopRequireDefault(require("invariant"));
|
|
|
17
17
|
|
|
18
18
|
var _tooltip = _interopRequireDefault(require("./tooltip.style"));
|
|
19
19
|
|
|
20
|
-
var _tooltipPointer = _interopRequireDefault(
|
|
21
|
-
require("./tooltip-pointer.style")
|
|
22
|
-
);
|
|
20
|
+
var _tooltipPointer = _interopRequireDefault(require("./tooltip-pointer.style"));
|
|
23
21
|
|
|
24
22
|
var _tooltip2 = require("./tooltip.config");
|
|
25
23
|
|
|
26
|
-
var _tags = _interopRequireDefault(
|
|
27
|
-
|
|
28
|
-
);
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
function _interopRequireDefault(obj) {
|
|
35
|
-
return obj && obj.__esModule ? obj : { default: obj };
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
function _extends() {
|
|
39
|
-
_extends =
|
|
40
|
-
Object.assign ||
|
|
41
|
-
function (target) {
|
|
42
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
43
|
-
var source = arguments[i];
|
|
44
|
-
for (var key in source) {
|
|
45
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
46
|
-
target[key] = source[key];
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
return target;
|
|
51
|
-
};
|
|
52
|
-
return _extends.apply(this, arguments);
|
|
53
|
-
}
|
|
24
|
+
var _tags = _interopRequireDefault(require("../../__internal__/utils/helpers/tags/tags"));
|
|
25
|
+
|
|
26
|
+
var _carbonScopedTokensProvider = _interopRequireDefault(require("../../style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component"));
|
|
27
|
+
|
|
28
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
+
|
|
30
|
+
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); }
|
|
54
31
|
|
|
55
32
|
const TOOLTIP_DELAY = 100;
|
|
56
33
|
const tippyPlugins = [_tippy.sticky];
|
|
57
34
|
|
|
58
|
-
const Tooltip = /*#__PURE__*/
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
) => {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
_extends(
|
|
121
|
-
{
|
|
122
|
-
key: "pointer",
|
|
123
|
-
type: type,
|
|
124
|
-
},
|
|
125
|
-
attrs,
|
|
126
|
-
{
|
|
127
|
-
position: currentPosition,
|
|
128
|
-
"data-popper-arrow": "",
|
|
129
|
-
"data-element": "tooltip-pointer",
|
|
130
|
-
bgColor: bgColor,
|
|
131
|
-
}
|
|
132
|
-
)
|
|
133
|
-
),
|
|
134
|
-
content
|
|
135
|
-
)
|
|
136
|
-
);
|
|
137
|
-
};
|
|
138
|
-
|
|
139
|
-
return /*#__PURE__*/ _react.default.createElement(
|
|
140
|
-
_headless.default,
|
|
141
|
-
_extends(
|
|
142
|
-
{
|
|
143
|
-
placement: position,
|
|
144
|
-
delay: TOOLTIP_DELAY,
|
|
145
|
-
},
|
|
146
|
-
isVisible !== undefined && {
|
|
147
|
-
visible: isVisible,
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
plugins: tippyPlugins,
|
|
151
|
-
sticky: true,
|
|
152
|
-
render: (attrs) => tooltip(attrs, message),
|
|
153
|
-
reference: target,
|
|
154
|
-
popperOptions: {
|
|
155
|
-
modifiers: [
|
|
156
|
-
...(flipOverrides
|
|
157
|
-
? [
|
|
158
|
-
{
|
|
159
|
-
name: "flip",
|
|
160
|
-
options: {
|
|
161
|
-
fallbackPlacements: flipOverrides,
|
|
162
|
-
},
|
|
163
|
-
},
|
|
164
|
-
]
|
|
165
|
-
: []),
|
|
166
|
-
{
|
|
167
|
-
name: "computeStyles",
|
|
168
|
-
options: {
|
|
169
|
-
gpuAcceleration: false,
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
],
|
|
173
|
-
},
|
|
35
|
+
const Tooltip = /*#__PURE__*/_react.default.forwardRef(({
|
|
36
|
+
children,
|
|
37
|
+
isVisible,
|
|
38
|
+
position = "top",
|
|
39
|
+
message,
|
|
40
|
+
type,
|
|
41
|
+
size = "medium",
|
|
42
|
+
isPartOfInput,
|
|
43
|
+
inputSize,
|
|
44
|
+
id,
|
|
45
|
+
bgColor,
|
|
46
|
+
fontColor,
|
|
47
|
+
flipOverrides,
|
|
48
|
+
target,
|
|
49
|
+
...rest
|
|
50
|
+
}, ref) => {
|
|
51
|
+
const isFlipOverridesValid = !flipOverrides || Array.isArray(flipOverrides) && flipOverrides.every(placement => _tooltip2.TOOLTIP_POSITIONS.includes(placement));
|
|
52
|
+
(0, _invariant.default)(isFlipOverridesValid, `The flipOverrides prop supplied to Tooltip must be an array containing some or all of ["top", "bottom", "left", "right"].`);
|
|
53
|
+
|
|
54
|
+
const tooltip = (attrs, content) => {
|
|
55
|
+
const currentPosition = attrs["data-placement"] || position;
|
|
56
|
+
return /*#__PURE__*/_react.default.createElement(_carbonScopedTokensProvider.default, null, /*#__PURE__*/_react.default.createElement(_tooltip.default, _extends({
|
|
57
|
+
"data-element": "tooltip",
|
|
58
|
+
role: "tooltip",
|
|
59
|
+
tabIndex: -1,
|
|
60
|
+
type: type,
|
|
61
|
+
size: size,
|
|
62
|
+
id: id
|
|
63
|
+
}, (0, _tags.default)("tooltip", rest), {
|
|
64
|
+
isPartOfInput: isPartOfInput,
|
|
65
|
+
inputSize: inputSize
|
|
66
|
+
}, attrs, {
|
|
67
|
+
position: currentPosition,
|
|
68
|
+
ref: ref,
|
|
69
|
+
bgColor: bgColor,
|
|
70
|
+
fontColor: fontColor
|
|
71
|
+
}), /*#__PURE__*/_react.default.createElement(_tooltipPointer.default, _extends({
|
|
72
|
+
key: "pointer",
|
|
73
|
+
type: type
|
|
74
|
+
}, attrs, {
|
|
75
|
+
position: currentPosition,
|
|
76
|
+
"data-popper-arrow": "",
|
|
77
|
+
"data-element": "tooltip-pointer",
|
|
78
|
+
bgColor: bgColor
|
|
79
|
+
})), content));
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
return /*#__PURE__*/_react.default.createElement(_headless.default, _extends({
|
|
83
|
+
placement: position,
|
|
84
|
+
delay: TOOLTIP_DELAY
|
|
85
|
+
}, isVisible !== undefined && {
|
|
86
|
+
visible: isVisible
|
|
87
|
+
}, {
|
|
88
|
+
plugins: tippyPlugins,
|
|
89
|
+
sticky: true,
|
|
90
|
+
render: attrs => tooltip(attrs, message),
|
|
91
|
+
reference: target,
|
|
92
|
+
popperOptions: {
|
|
93
|
+
modifiers: [...(flipOverrides ? [{
|
|
94
|
+
name: "flip",
|
|
95
|
+
options: {
|
|
96
|
+
fallbackPlacements: flipOverrides
|
|
174
97
|
}
|
|
175
|
-
),
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
98
|
+
}] : []), {
|
|
99
|
+
name: "computeStyles",
|
|
100
|
+
options: {
|
|
101
|
+
gpuAcceleration: false
|
|
102
|
+
}
|
|
103
|
+
}]
|
|
104
|
+
}
|
|
105
|
+
}), children);
|
|
106
|
+
});
|
|
180
107
|
|
|
108
|
+
exports.Tooltip = Tooltip;
|
|
181
109
|
Tooltip.propTypes = {
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
*/
|
|
195
|
-
flipOverrides: _propTypes.default.arrayOf(
|
|
196
|
-
_propTypes.default.oneOf(["bottom", "left", "right", "top"])
|
|
197
|
-
),
|
|
198
|
-
/**
|
|
199
|
-
* Override font color of the Tooltip, provide any color from palette or any valid css color value.
|
|
200
|
-
*/
|
|
201
|
-
fontColor: _propTypes.default.string,
|
|
202
|
-
/**
|
|
203
|
-
* The id attribute to use for the tooltip
|
|
204
|
-
*/
|
|
205
|
-
id: _propTypes.default.string,
|
|
206
|
-
inputSize: _propTypes.default.oneOf(["large", "medium", "small"]),
|
|
207
|
-
isPartOfInput: _propTypes.default.bool,
|
|
208
|
-
/**
|
|
209
|
-
* Whether to to show the Tooltip
|
|
210
|
-
*/
|
|
211
|
-
isVisible: _propTypes.default.bool,
|
|
212
|
-
key: _propTypes.default.oneOfType([
|
|
213
|
-
_propTypes.default.number,
|
|
214
|
-
_propTypes.default.string,
|
|
215
|
-
]),
|
|
216
|
-
/**
|
|
217
|
-
* The message to be displayed within the tooltip
|
|
218
|
-
*/
|
|
219
|
-
message: _propTypes.default.node,
|
|
220
|
-
/**
|
|
221
|
-
* Sets position of the tooltip
|
|
222
|
-
*/
|
|
223
|
-
position: _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
|
|
224
|
-
/**
|
|
225
|
-
* Defines the size of the tooltip content
|
|
226
|
-
*/
|
|
227
|
-
size: _propTypes.default.oneOf(["large", "medium"]),
|
|
228
|
-
target: function (props, propName) {
|
|
110
|
+
"bgColor": _propTypes.default.string,
|
|
111
|
+
"children": _propTypes.default.element.isRequired,
|
|
112
|
+
"flipOverrides": _propTypes.default.arrayOf(_propTypes.default.oneOf(["bottom", "left", "right", "top"])),
|
|
113
|
+
"fontColor": _propTypes.default.string,
|
|
114
|
+
"id": _propTypes.default.string,
|
|
115
|
+
"inputSize": _propTypes.default.oneOf(["large", "medium", "small"]),
|
|
116
|
+
"isPartOfInput": _propTypes.default.bool,
|
|
117
|
+
"isVisible": _propTypes.default.bool,
|
|
118
|
+
"message": _propTypes.default.node,
|
|
119
|
+
"position": _propTypes.default.oneOf(["bottom", "left", "right", "top"]),
|
|
120
|
+
"size": _propTypes.default.oneOf(["large", "medium"]),
|
|
121
|
+
"target": function (props, propName) {
|
|
229
122
|
if (props[propName] == null) {
|
|
230
123
|
return null;
|
|
231
|
-
} else if (
|
|
232
|
-
|
|
233
|
-
props[propName].nodeType !== 1
|
|
234
|
-
) {
|
|
235
|
-
return new Error(
|
|
236
|
-
"Expected prop '" + propName + "' to be of type Element"
|
|
237
|
-
);
|
|
124
|
+
} else if (typeof props[propName] !== 'object' || props[propName].nodeType !== 1) {
|
|
125
|
+
return new Error("Expected prop '" + propName + "' to be of type Element");
|
|
238
126
|
}
|
|
239
127
|
},
|
|
240
|
-
|
|
241
|
-
* Defines the message type
|
|
242
|
-
*/
|
|
243
|
-
type: _propTypes.default.string,
|
|
128
|
+
"type": _propTypes.default.string
|
|
244
129
|
};
|
|
245
|
-
|
|
246
|
-
exports.Tooltip = Tooltip;
|
|
247
130
|
Tooltip.displayName = "Tooltip";
|
|
248
131
|
var _default = Tooltip;
|
|
249
|
-
exports.default = _default;
|
|
132
|
+
exports.default = _default;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SpaceProps } from "styled-system";
|
|
3
3
|
declare type TintRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100;
|
|
4
|
-
export interface
|
|
4
|
+
export interface VerticalDividerProps extends SpaceProps {
|
|
5
5
|
h?: number | string;
|
|
6
6
|
height?: number | string;
|
|
7
7
|
displayInline?: boolean;
|
|
8
8
|
/** the supported rage is 1-100 */
|
|
9
9
|
tint?: TintRange;
|
|
10
10
|
}
|
|
11
|
-
declare const VerticalDivider: ({ h, height, displayInline, tint, ...props }:
|
|
11
|
+
declare const VerticalDivider: ({ h, height, displayInline, tint, ...props }: VerticalDividerProps) => JSX.Element;
|
|
12
12
|
export default VerticalDivider;
|