@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
|
@@ -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 PropTypes from 'prop-types';
|
|
9
|
-
|
|
10
|
-
const iconPropTypes = {
|
|
11
|
-
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export { iconPropTypes as i };
|
|
@@ -1,125 +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 _defineProperty(e, r, t) {
|
|
9
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
10
|
-
value: t,
|
|
11
|
-
enumerable: !0,
|
|
12
|
-
configurable: !0,
|
|
13
|
-
writable: !0
|
|
14
|
-
}) : e[r] = t, e;
|
|
15
|
-
}
|
|
16
|
-
function ownKeys(e, r) {
|
|
17
|
-
var t = Object.keys(e);
|
|
18
|
-
if (Object.getOwnPropertySymbols) {
|
|
19
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
20
|
-
r && (o = o.filter(function (r) {
|
|
21
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
22
|
-
})), t.push.apply(t, o);
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
}
|
|
26
|
-
function _objectSpread2(e) {
|
|
27
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
28
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
29
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
30
|
-
_defineProperty(e, r, t[r]);
|
|
31
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
32
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
return e;
|
|
36
|
-
}
|
|
37
|
-
function _objectWithoutProperties(e, t) {
|
|
38
|
-
if (null == e) return {};
|
|
39
|
-
var o,
|
|
40
|
-
r,
|
|
41
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
42
|
-
if (Object.getOwnPropertySymbols) {
|
|
43
|
-
var n = Object.getOwnPropertySymbols(e);
|
|
44
|
-
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
45
|
-
}
|
|
46
|
-
return i;
|
|
47
|
-
}
|
|
48
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
49
|
-
if (null == r) return {};
|
|
50
|
-
var t = {};
|
|
51
|
-
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
52
|
-
if (-1 !== e.indexOf(n)) continue;
|
|
53
|
-
t[n] = r[n];
|
|
54
|
-
}
|
|
55
|
-
return t;
|
|
56
|
-
}
|
|
57
|
-
function _toPrimitive(t, r) {
|
|
58
|
-
if ("object" != typeof t || !t) return t;
|
|
59
|
-
var e = t[Symbol.toPrimitive];
|
|
60
|
-
if (void 0 !== e) {
|
|
61
|
-
var i = e.call(t, r || "default");
|
|
62
|
-
if ("object" != typeof i) return i;
|
|
63
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
64
|
-
}
|
|
65
|
-
return ("string" === r ? String : Number)(t);
|
|
66
|
-
}
|
|
67
|
-
function _toPropertyKey(t) {
|
|
68
|
-
var i = _toPrimitive(t, "string");
|
|
69
|
-
return "symbol" == typeof i ? i : i + "";
|
|
70
|
-
}
|
|
71
|
-
var _excluded = ["width", "height", "viewBox"],
|
|
72
|
-
_excluded2 = ["tabindex"];
|
|
73
|
-
/**
|
|
74
|
-
* Copyright IBM Corp. 2018, 2024
|
|
75
|
-
*
|
|
76
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
77
|
-
* LICENSE file in the root directory of this source tree.
|
|
78
|
-
*/
|
|
79
|
-
|
|
80
|
-
var defaultAttributes = {
|
|
81
|
-
// Reference:
|
|
82
|
-
// https://github.com/IBM/carbon-components-react/issues/1392
|
|
83
|
-
// https://github.com/PolymerElements/iron-iconset-svg/pull/47
|
|
84
|
-
// `focusable` is a string attribute which is why we do not use a boolean here
|
|
85
|
-
focusable: 'false',
|
|
86
|
-
preserveAspectRatio: 'xMidYMid meet'
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/**
|
|
90
|
-
* Get supplementary HTML attributes for a given <svg> element based on existing
|
|
91
|
-
* attributes.
|
|
92
|
-
*/
|
|
93
|
-
function getAttributes() {
|
|
94
|
-
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
95
|
-
width = _ref.width,
|
|
96
|
-
height = _ref.height,
|
|
97
|
-
_ref$viewBox = _ref.viewBox,
|
|
98
|
-
viewBox = _ref$viewBox === void 0 ? "0 0 ".concat(width, " ").concat(height) : _ref$viewBox,
|
|
99
|
-
attributes = _objectWithoutProperties(_ref, _excluded);
|
|
100
|
-
var tabindex = attributes.tabindex,
|
|
101
|
-
rest = _objectWithoutProperties(attributes, _excluded2);
|
|
102
|
-
var iconAttributes = _objectSpread2(_objectSpread2(_objectSpread2({}, defaultAttributes), rest), {}, {
|
|
103
|
-
width: width,
|
|
104
|
-
height: height,
|
|
105
|
-
viewBox: viewBox
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
// TODO: attributes.title assumes that the consumer will implement <title> and
|
|
109
|
-
// correctly set `aria-labelledby`.
|
|
110
|
-
if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby'] || iconAttributes.title) {
|
|
111
|
-
iconAttributes.role = 'img';
|
|
112
|
-
|
|
113
|
-
// Reference:
|
|
114
|
-
// https://allyjs.io/tutorials/focusing-in-svg.html
|
|
115
|
-
if (tabindex !== undefined && tabindex !== null) {
|
|
116
|
-
iconAttributes.focusable = 'true';
|
|
117
|
-
iconAttributes.tabindex = tabindex;
|
|
118
|
-
}
|
|
119
|
-
} else {
|
|
120
|
-
iconAttributes['aria-hidden'] = true;
|
|
121
|
-
}
|
|
122
|
-
return iconAttributes;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export { defaultAttributes, getAttributes };
|
|
@@ -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 { __module as classnames } from '../../_virtual/index2.js';
|
|
9
|
-
|
|
10
|
-
var hasRequiredClassnames;
|
|
11
|
-
function requireClassnames() {
|
|
12
|
-
if (hasRequiredClassnames) return classnames.exports;
|
|
13
|
-
hasRequiredClassnames = 1;
|
|
14
|
-
(function (module) {
|
|
15
|
-
/* global define */
|
|
16
|
-
|
|
17
|
-
(function () {
|
|
18
|
-
|
|
19
|
-
var hasOwn = {}.hasOwnProperty;
|
|
20
|
-
function classNames() {
|
|
21
|
-
var classes = '';
|
|
22
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
23
|
-
var arg = arguments[i];
|
|
24
|
-
if (arg) {
|
|
25
|
-
classes = appendClass(classes, parseValue(arg));
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return classes;
|
|
29
|
-
}
|
|
30
|
-
function parseValue(arg) {
|
|
31
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
32
|
-
return arg;
|
|
33
|
-
}
|
|
34
|
-
if (typeof arg !== 'object') {
|
|
35
|
-
return '';
|
|
36
|
-
}
|
|
37
|
-
if (Array.isArray(arg)) {
|
|
38
|
-
return classNames.apply(null, arg);
|
|
39
|
-
}
|
|
40
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
41
|
-
return arg.toString();
|
|
42
|
-
}
|
|
43
|
-
var classes = '';
|
|
44
|
-
for (var key in arg) {
|
|
45
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
46
|
-
classes = appendClass(classes, key);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
return classes;
|
|
50
|
-
}
|
|
51
|
-
function appendClass(value, newClass) {
|
|
52
|
-
if (!newClass) {
|
|
53
|
-
return value;
|
|
54
|
-
}
|
|
55
|
-
if (value) {
|
|
56
|
-
return value + ' ' + newClass;
|
|
57
|
-
}
|
|
58
|
-
return value + newClass;
|
|
59
|
-
}
|
|
60
|
-
if (module.exports) {
|
|
61
|
-
classNames.default = classNames;
|
|
62
|
-
module.exports = classNames;
|
|
63
|
-
} else {
|
|
64
|
-
window.classNames = classNames;
|
|
65
|
-
}
|
|
66
|
-
})();
|
|
67
|
-
})(classnames);
|
|
68
|
-
return classnames.exports;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
export { requireClassnames as __require };
|
|
@@ -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
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
function getDefaultExportFromCjs (x) {
|
|
11
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
package/lib/_virtual/index.js
DELETED
|
@@ -1,18 +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
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
var _commonjsHelpers = require('./_commonjsHelpers.js');
|
|
13
|
-
var index = require('../node_modules/classnames/index.js');
|
|
14
|
-
|
|
15
|
-
var classnamesExports = index.__require();
|
|
16
|
-
var cx = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(classnamesExports);
|
|
17
|
-
|
|
18
|
-
exports.default = cx;
|
package/lib/_virtual/index2.js
DELETED
|
@@ -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
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
var classnames = {exports: {}};
|
|
11
|
-
|
|
12
|
-
exports.__module = classnames;
|
|
@@ -1,75 +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
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
var index = require('../node_modules/@carbon/icon-helpers/es/index.js');
|
|
13
|
-
var PropTypes = require('prop-types');
|
|
14
|
-
var React = require('react');
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Copyright IBM Corp. 2019, 2023
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
|
-
* LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/
|
|
22
|
-
const Icon = /*#__PURE__*/React.forwardRef(function Icon(_ref, ref) {
|
|
23
|
-
let {
|
|
24
|
-
className,
|
|
25
|
-
children,
|
|
26
|
-
tabIndex,
|
|
27
|
-
xmlns = 'http://www.w3.org/2000/svg',
|
|
28
|
-
preserveAspectRatio = 'xMidYMid meet',
|
|
29
|
-
...rest
|
|
30
|
-
} = _ref;
|
|
31
|
-
const {
|
|
32
|
-
tabindex,
|
|
33
|
-
...attrs
|
|
34
|
-
} = index.getAttributes({
|
|
35
|
-
...rest,
|
|
36
|
-
tabindex: tabIndex
|
|
37
|
-
});
|
|
38
|
-
const props = attrs;
|
|
39
|
-
if (className) {
|
|
40
|
-
props.className = className;
|
|
41
|
-
}
|
|
42
|
-
if (tabindex !== undefined && tabindex !== null) {
|
|
43
|
-
if (typeof tabindex === 'number') {
|
|
44
|
-
props.tabIndex = tabindex;
|
|
45
|
-
} else {
|
|
46
|
-
props.tabIndex = Number(tabIndex);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
if (ref) {
|
|
50
|
-
props.ref = ref;
|
|
51
|
-
}
|
|
52
|
-
if (xmlns) {
|
|
53
|
-
props.xmlns = xmlns;
|
|
54
|
-
}
|
|
55
|
-
if (preserveAspectRatio) {
|
|
56
|
-
props.preserveAspectRatio = preserveAspectRatio;
|
|
57
|
-
}
|
|
58
|
-
return /*#__PURE__*/React.createElement('svg', props, children);
|
|
59
|
-
});
|
|
60
|
-
Icon.displayName = 'Icon';
|
|
61
|
-
Icon.propTypes = {
|
|
62
|
-
'aria-hidden': PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['true', 'false'])]),
|
|
63
|
-
'aria-label': PropTypes.string,
|
|
64
|
-
'aria-labelledby': PropTypes.string,
|
|
65
|
-
children: PropTypes.node,
|
|
66
|
-
className: PropTypes.string,
|
|
67
|
-
height: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
68
|
-
preserveAspectRatio: PropTypes.string,
|
|
69
|
-
tabIndex: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
70
|
-
viewBox: PropTypes.string,
|
|
71
|
-
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
72
|
-
xmlns: PropTypes.string
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
exports.default = Icon;
|