@carbon-labs/react-ui-shell 0.60.0 → 0.62.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/es/components/HeaderContainer.js +10 -11
- package/es/components/HeaderDivider.js +6 -7
- package/es/components/HeaderPopover.js +28 -31
- package/es/components/Link.js +10 -11
- package/es/components/Profile.js +31 -34
- package/es/components/SharkFinIcon.js +10 -11
- package/es/components/SideNav.js +46 -40
- package/es/components/SideNavFlyoutMenu.js +29 -31
- package/es/components/SideNavItems.js +12 -13
- package/es/components/SideNavLink.js +18 -19
- package/es/components/SideNavLinkPopover.js +8 -9
- package/es/components/SideNavMenu.js +40 -42
- package/es/components/SideNavMenuItem.js +9 -9
- package/es/components/SideNavSlot.js +10 -11
- package/es/components/SideNavToggle.js +11 -12
- package/es/components/TrialCountdown.js +10 -11
- package/es/internal/keyboard/match.js +6 -7
- package/es/internal/useDelayedState.js +1 -2
- package/es/internal/useId.js +4 -6
- package/es/internal/useIdPrefix.js +3 -3
- package/es/internal/usePrefix.js +3 -3
- package/es/internal/warning.js +1 -4
- package/es/node_modules/@carbon/ibm-products/es/components/TooltipTrigger/TooltipTrigger.js +4 -4
- package/es/node_modules/@carbon/ibm-products/es/components/UserAvatar/UserAvatar.js +10 -10
- package/es/node_modules/@carbon/ibm-products/es/components/_Canary/Canary.js +5 -5
- package/es/node_modules/@carbon/ibm-products/es/settings.js +2 -2
- package/es/prop-types/deprecate.js +1 -4
- package/es/prop-types/isRequiredOneOf.js +1 -4
- package/lib/components/HeaderContainer.js +18 -19
- package/lib/components/HeaderDivider.js +7 -8
- package/lib/components/HeaderPopover.js +34 -37
- package/lib/components/Link.js +11 -12
- package/lib/components/Profile.js +34 -37
- package/lib/components/SharkFinIcon.js +11 -12
- package/lib/components/SideNav.js +62 -56
- package/lib/components/SideNavFlyoutMenu.js +44 -46
- package/lib/components/SideNavItems.js +16 -17
- package/lib/components/SideNavLink.js +20 -21
- package/lib/components/SideNavLinkPopover.js +9 -10
- package/lib/components/SideNavMenu.js +60 -62
- package/lib/components/SideNavMenuItem.js +12 -12
- package/lib/components/SideNavSlot.js +11 -12
- package/lib/components/SideNavToggle.js +12 -13
- package/lib/components/TrialCountdown.js +11 -12
- package/lib/internal/keyboard/match.js +6 -7
- package/lib/internal/useDelayedState.js +5 -6
- package/lib/internal/useEvent.js +4 -4
- package/lib/internal/useId.js +7 -9
- package/lib/internal/useIdPrefix.js +3 -3
- package/lib/internal/useMatchMedia.js +3 -3
- package/lib/internal/useMergedRefs.js +2 -2
- package/lib/internal/usePrefix.js +3 -3
- package/lib/internal/warning.js +1 -4
- package/lib/node_modules/@carbon/ibm-products/es/components/TooltipTrigger/TooltipTrigger.js +8 -8
- package/lib/node_modules/@carbon/ibm-products/es/components/UserAvatar/UserAvatar.js +11 -11
- package/lib/node_modules/@carbon/ibm-products/es/components/_Canary/Canary.js +9 -9
- package/lib/node_modules/@carbon/ibm-products/es/settings.js +2 -2
- package/lib/prop-types/deprecate.js +1 -4
- package/lib/prop-types/isRequiredOneOf.js +1 -4
- package/package.json +3 -3
- package/es/_virtual/_commonjsHelpers.js +0 -12
- package/es/_virtual/index.js +0 -14
- package/es/_virtual/index2.js +0 -10
- package/es/node_modules/@carbon/icons-react/es/Icon.js +0 -71
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-0.js +0 -2956
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-15.js +0 -3043
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -3181
- package/es/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -14
- package/es/node_modules/@carbon/icons-react/node_modules/@carbon/icon-helpers/es/index.js +0 -125
- package/es/node_modules/classnames/index.js +0 -71
- package/lib/_virtual/_commonjsHelpers.js +0 -14
- package/lib/_virtual/index.js +0 -18
- package/lib/_virtual/index2.js +0 -12
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +0 -75
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-0.js +0 -3082
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-15.js +0 -3169
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -3307
- package/lib/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -16
- package/lib/node_modules/@carbon/icons-react/node_modules/@carbon/icon-helpers/es/index.js +0 -128
- package/lib/node_modules/classnames/index.js +0 -73
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var React__default = require('react');
|
|
11
11
|
|
|
12
12
|
/* eslint-disable jsdoc/require-jsdoc */
|
|
13
13
|
/**
|
|
@@ -17,7 +17,7 @@ var React = require('react');
|
|
|
17
17
|
* LICENSE file in the root directory of this source tree.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
const PrefixContext = /*#__PURE__*/
|
|
20
|
+
const PrefixContext = /*#__PURE__*/React__default.createContext('cds');
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* An internal function to return the prefix used in components and styles.
|
|
@@ -25,7 +25,7 @@ const PrefixContext = /*#__PURE__*/React.createContext('cds');
|
|
|
25
25
|
* @returns a react context including the prefix
|
|
26
26
|
*/
|
|
27
27
|
function usePrefix() {
|
|
28
|
-
return
|
|
28
|
+
return React__default.useContext(PrefixContext);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
exports.PrefixContext = PrefixContext;
|
package/lib/internal/warning.js
CHANGED
|
@@ -17,10 +17,7 @@
|
|
|
17
17
|
|
|
18
18
|
// const emptyFunction = function () {};
|
|
19
19
|
|
|
20
|
-
function warning(condition, format) {
|
|
21
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
22
|
-
args[_key - 2] = arguments[_key];
|
|
23
|
-
}
|
|
20
|
+
function warning(condition, format, ...args) {
|
|
24
21
|
{
|
|
25
22
|
let index = 0;
|
|
26
23
|
const message = format.replace(/%s/g, () => {
|
package/lib/node_modules/@carbon/ibm-products/es/components/TooltipTrigger/TooltipTrigger.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
11
|
-
var
|
|
12
|
-
var index
|
|
13
|
-
var
|
|
11
|
+
var React__default = require('react');
|
|
12
|
+
var index = require('../../_virtual/index.js');
|
|
13
|
+
var cx = require('classnames');
|
|
14
14
|
var settings = require('../../settings.js');
|
|
15
15
|
|
|
16
16
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
|
@@ -23,18 +23,18 @@ const componentName = 'TooltipTrigger';
|
|
|
23
23
|
* This is an tooltip trigger as Carbon Tooltip requires an active element to work but provides
|
|
24
24
|
* no blanked button.
|
|
25
25
|
*/
|
|
26
|
-
exports.TooltipTrigger = /*#__PURE__*/
|
|
26
|
+
exports.TooltipTrigger = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
27
27
|
let {
|
|
28
28
|
children,
|
|
29
29
|
className,
|
|
30
30
|
// Collect any other property values passed in.
|
|
31
31
|
...rest
|
|
32
32
|
} = _ref;
|
|
33
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React__default.createElement("button", _rollupPluginBabelHelpers.extends({
|
|
34
34
|
type: "button",
|
|
35
35
|
ref: ref
|
|
36
36
|
}, rest, {
|
|
37
|
-
className:
|
|
37
|
+
className: cx(blockClass,
|
|
38
38
|
// Apply the block class to the main HTML element
|
|
39
39
|
className // Apply any supplied class names to the main HTML element.
|
|
40
40
|
)
|
|
@@ -55,9 +55,9 @@ exports.TooltipTrigger.propTypes = {
|
|
|
55
55
|
/**
|
|
56
56
|
* Child content of tooltip trigger
|
|
57
57
|
*/
|
|
58
|
-
children: index
|
|
58
|
+
children: index.default.node,
|
|
59
59
|
/**
|
|
60
60
|
* Provide an optional class to be applied to the containing node.
|
|
61
61
|
*/
|
|
62
|
-
className: index
|
|
62
|
+
className: index.default.string
|
|
63
63
|
};
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
11
|
-
var
|
|
11
|
+
var React__default = require('react');
|
|
12
12
|
var index = require('../../_virtual/index.js');
|
|
13
|
-
var
|
|
13
|
+
var cx = require('classnames');
|
|
14
14
|
var devtools = require('../../global/js/utils/devtools.js');
|
|
15
15
|
var settings = require('../../settings.js');
|
|
16
16
|
var react = require('@carbon/react');
|
|
@@ -31,7 +31,7 @@ const componentName = 'UserAvatar';
|
|
|
31
31
|
* TODO: A description of the component.
|
|
32
32
|
*/
|
|
33
33
|
|
|
34
|
-
exports.UserAvatar = /*#__PURE__*/
|
|
34
|
+
exports.UserAvatar = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
35
35
|
let {
|
|
36
36
|
// The component props, in alphabetical order (for consistency).
|
|
37
37
|
backgroundColor = 'order-1-cyan',
|
|
@@ -73,22 +73,22 @@ exports.UserAvatar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
73
73
|
size: iconSize[size]
|
|
74
74
|
};
|
|
75
75
|
if (image) {
|
|
76
|
-
return /*#__PURE__*/
|
|
76
|
+
return /*#__PURE__*/React__default.createElement("img", {
|
|
77
77
|
alt: imageDescription,
|
|
78
78
|
src: image,
|
|
79
79
|
className: `${blockClass}__photo ${blockClass}__photo--${size}`
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
if (RenderIcon) {
|
|
83
|
-
return /*#__PURE__*/
|
|
83
|
+
return /*#__PURE__*/React__default.createElement(RenderIcon, iconProps);
|
|
84
84
|
}
|
|
85
85
|
if (name) {
|
|
86
86
|
return formatInitials();
|
|
87
87
|
}
|
|
88
|
-
return /*#__PURE__*/
|
|
88
|
+
return /*#__PURE__*/React__default.createElement(icons.User, iconProps);
|
|
89
89
|
};
|
|
90
|
-
const Avatar = () => /*#__PURE__*/
|
|
91
|
-
className:
|
|
90
|
+
const Avatar = () => /*#__PURE__*/React__default.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
|
|
91
|
+
className: cx(blockClass,
|
|
92
92
|
// Apply the block class to the main HTML element
|
|
93
93
|
className,
|
|
94
94
|
// Apply any supplied class names to the main HTML element.
|
|
@@ -101,13 +101,13 @@ exports.UserAvatar = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
101
101
|
ref: ref
|
|
102
102
|
}, devtools.getDevtoolsProps(componentName)), getItem());
|
|
103
103
|
if (tooltipText) {
|
|
104
|
-
return /*#__PURE__*/
|
|
104
|
+
return /*#__PURE__*/React__default.createElement(react.Tooltip, {
|
|
105
105
|
align: tooltipAlignment,
|
|
106
106
|
label: tooltipText,
|
|
107
107
|
className: `${blockClass}__tooltip ${carbonPrefix}--icon-tooltip`
|
|
108
|
-
}, /*#__PURE__*/
|
|
108
|
+
}, /*#__PURE__*/React__default.createElement(TooltipTrigger.TooltipTrigger, null, /*#__PURE__*/React__default.createElement(Avatar, null)));
|
|
109
109
|
}
|
|
110
|
-
return /*#__PURE__*/
|
|
110
|
+
return /*#__PURE__*/React__default.createElement(Avatar, null);
|
|
111
111
|
});
|
|
112
112
|
|
|
113
113
|
// Return a placeholder if not released and not enabled by feature flag
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
11
|
-
var
|
|
12
|
-
var index
|
|
13
|
-
var
|
|
11
|
+
var React__default = require('react');
|
|
12
|
+
var index = require('../../_virtual/index.js');
|
|
13
|
+
var cx = require('classnames');
|
|
14
14
|
var packageSettings = require('../../global/js/package-settings.js');
|
|
15
15
|
var react = require('@carbon/react');
|
|
16
16
|
|
|
@@ -33,19 +33,19 @@ import { pkg } from '@carbon/ibm-products';
|
|
|
33
33
|
// NOTE: must happen before component is first used
|
|
34
34
|
pkg.component.${componentName} = true;
|
|
35
35
|
`;
|
|
36
|
-
return /*#__PURE__*/
|
|
37
|
-
className:
|
|
38
|
-
}), /*#__PURE__*/
|
|
36
|
+
return /*#__PURE__*/React__default.createElement("div", _rollupPluginBabelHelpers.extends({}, rest, {
|
|
37
|
+
className: cx(blockClass, className)
|
|
38
|
+
}), /*#__PURE__*/React__default.createElement("h2", null, "This component ", /*#__PURE__*/React__default.createElement("strong", null, componentName), " is not ready yet."), _p || (_p = /*#__PURE__*/React__default.createElement("p", null, "To enable it, initialize package flags before the component is first used.")), _br || (_br = /*#__PURE__*/React__default.createElement("br", null)), _p2 || (_p2 = /*#__PURE__*/React__default.createElement("p", null, "e.g. in main.js")), /*#__PURE__*/React__default.createElement(react.CodeSnippet, {
|
|
39
39
|
type: "multi"
|
|
40
|
-
}, instructions), _br2 || (_br2 = /*#__PURE__*/
|
|
40
|
+
}, instructions), _br2 || (_br2 = /*#__PURE__*/React__default.createElement("br", null)), _p3 || (_p3 = /*#__PURE__*/React__default.createElement("p", null, "View a live example on", ' ', /*#__PURE__*/React__default.createElement("a", {
|
|
41
41
|
href: "https://codesandbox.io/s/example-component-olif5?file=/src/config.js"
|
|
42
42
|
}, "codesandbox"), ".")));
|
|
43
43
|
};
|
|
44
44
|
Canary.propTypes = {
|
|
45
45
|
/** Provide an optional class to be applied to the containing node */
|
|
46
|
-
className: index
|
|
46
|
+
className: index.default.string,
|
|
47
47
|
/** Name of the component that is not ready yet */
|
|
48
|
-
componentName: index
|
|
48
|
+
componentName: index.default.string.isRequired
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
exports.Canary = Canary;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
'use strict';
|
|
9
9
|
|
|
10
10
|
var packageSettings = require('./global/js/package-settings.js');
|
|
11
|
-
var
|
|
11
|
+
var React__default = require('react');
|
|
12
12
|
var pconsole = require('./global/js/utils/pconsole.js');
|
|
13
13
|
var Canary = require('./components/_Canary/Canary.js');
|
|
14
14
|
|
|
@@ -32,7 +32,7 @@ packageSettings.default.logDeprecated = (component, name) => {
|
|
|
32
32
|
packageSettings.default.checkComponentEnabled = (component, name) => {
|
|
33
33
|
if (component.render) {
|
|
34
34
|
// The component is a forward-ref, so make a stub forward-ref.
|
|
35
|
-
const forward = /*#__PURE__*/
|
|
35
|
+
const forward = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
36
36
|
packageSettings.default.logDeprecated(component, name); // may log don't care about result
|
|
37
37
|
// Replace the stub's render fn so this test only happens once.
|
|
38
38
|
return (forward.render = packageSettings.default.isComponentEnabled(name) || !packageSettings.default.isComponentPublic(name) ?
|
|
@@ -21,7 +21,7 @@ var warning = require('../internal/warning.js');
|
|
|
21
21
|
|
|
22
22
|
const didWarnAboutDeprecation = {};
|
|
23
23
|
function deprecate(propType, message) {
|
|
24
|
-
function checker(props, propName, componentName) {
|
|
24
|
+
function checker(props, propName, componentName, ...rest) {
|
|
25
25
|
if (props[propName] === undefined) {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
@@ -32,9 +32,6 @@ function deprecate(propType, message) {
|
|
|
32
32
|
};
|
|
33
33
|
process.env.NODE_ENV !== "production" ? warning.warning(false, message) : void 0;
|
|
34
34
|
}
|
|
35
|
-
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
36
|
-
rest[_key - 3] = arguments[_key];
|
|
37
|
-
}
|
|
38
35
|
return propType(props, propName, componentName, ...rest);
|
|
39
36
|
}
|
|
40
37
|
return checker;
|
|
@@ -26,13 +26,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
26
26
|
*/
|
|
27
27
|
function isRequiredOneOf(propTypes) {
|
|
28
28
|
const names = Object.keys(propTypes);
|
|
29
|
-
const checker = propType =>
|
|
29
|
+
const checker = propType => (props, propName, componentName, ...rest) => {
|
|
30
30
|
if (process.env.NODE_ENV !== 'production' && names.every(name => typeof props[name] === 'undefined')) {
|
|
31
31
|
return new Error(`${componentName} requires one of the following props: ${names.join(', ')}`);
|
|
32
32
|
}
|
|
33
|
-
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
34
|
-
rest[_key - 3] = arguments[_key];
|
|
35
|
-
}
|
|
36
33
|
return propType(props, propName, componentName, ...rest);
|
|
37
34
|
};
|
|
38
35
|
return names.reduce((o, name) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon-labs/react-ui-shell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.62.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "node ../../../tasks/build.js",
|
|
34
|
-
"clean": "
|
|
34
|
+
"clean": "rimraf es lib scss",
|
|
35
35
|
"postinstall": "ibmtelemetry --config=telemetry.yml",
|
|
36
36
|
"telemetry:config": "npx -y @ibm/telemetry-js-config-generator generate --id 5b9dce15-eeda-4b53-8683-3e3aeb599fd1 --endpoint https://www-api.ibm.com/ibm-telemetry/v1/metrics --files ./components/**/*.(tsx|js|jsx)"
|
|
37
37
|
},
|
|
@@ -42,5 +42,5 @@
|
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@ibm/telemetry-js": "^1.9.1"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "9656b7b03d0232cdda3cf200d972eaf727a35fbc"
|
|
46
46
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2024
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
function getDefaultExportFromCjs (x) {
|
|
9
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { getDefaultExportFromCjs };
|
package/es/_virtual/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2024
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { getDefaultExportFromCjs } from './_commonjsHelpers.js';
|
|
9
|
-
import { __require as requireClassnames } from '../node_modules/classnames/index.js';
|
|
10
|
-
|
|
11
|
-
var classnamesExports = requireClassnames();
|
|
12
|
-
var cx = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
13
|
-
|
|
14
|
-
export { cx as default };
|
package/es/_virtual/index2.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright IBM Corp. 2024
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
import { getAttributes } from '../node_modules/@carbon/icon-helpers/es/index.js';
|
|
9
|
-
import PropTypes from 'prop-types';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Copyright IBM Corp. 2019, 2023
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/
|
|
18
|
-
const Icon = /*#__PURE__*/React.forwardRef(function Icon(_ref, ref) {
|
|
19
|
-
let {
|
|
20
|
-
className,
|
|
21
|
-
children,
|
|
22
|
-
tabIndex,
|
|
23
|
-
xmlns = 'http://www.w3.org/2000/svg',
|
|
24
|
-
preserveAspectRatio = 'xMidYMid meet',
|
|
25
|
-
...rest
|
|
26
|
-
} = _ref;
|
|
27
|
-
const {
|
|
28
|
-
tabindex,
|
|
29
|
-
...attrs
|
|
30
|
-
} = getAttributes({
|
|
31
|
-
...rest,
|
|
32
|
-
tabindex: tabIndex
|
|
33
|
-
});
|
|
34
|
-
const props = attrs;
|
|
35
|
-
if (className) {
|
|
36
|
-
props.className = className;
|
|
37
|
-
}
|
|
38
|
-
if (tabindex !== undefined && tabindex !== null) {
|
|
39
|
-
if (typeof tabindex === 'number') {
|
|
40
|
-
props.tabIndex = tabindex;
|
|
41
|
-
} else {
|
|
42
|
-
props.tabIndex = Number(tabIndex);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
if (ref) {
|
|
46
|
-
props.ref = ref;
|
|
47
|
-
}
|
|
48
|
-
if (xmlns) {
|
|
49
|
-
props.xmlns = xmlns;
|
|
50
|
-
}
|
|
51
|
-
if (preserveAspectRatio) {
|
|
52
|
-
props.preserveAspectRatio = preserveAspectRatio;
|
|
53
|
-
}
|
|
54
|
-
return /*#__PURE__*/React.createElement('svg', props, children);
|
|
55
|
-
});
|
|
56
|
-
Icon.displayName = 'Icon';
|
|
57
|
-
Icon.propTypes = {
|
|
58
|
-
'aria-hidden': PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['true', 'false'])]),
|
|
59
|
-
'aria-label': PropTypes.string,
|
|
60
|
-
'aria-labelledby': PropTypes.string,
|
|
61
|
-
children: PropTypes.node,
|
|
62
|
-
className: PropTypes.string,
|
|
63
|
-
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
64
|
-
preserveAspectRatio: PropTypes.string,
|
|
65
|
-
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
66
|
-
viewBox: PropTypes.string,
|
|
67
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
68
|
-
xmlns: PropTypes.string
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export { Icon as default };
|