@carbon/ibm-products 2.25.0 → 2.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. package/css/index-full-carbon.css +42 -10
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +1 -1
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +18 -2
  6. package/css/index-without-carbon-released-only.css.map +1 -1
  7. package/css/index-without-carbon-released-only.min.css +1 -1
  8. package/css/index-without-carbon-released-only.min.css.map +1 -1
  9. package/css/index-without-carbon.css +42 -10
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +1 -1
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +42 -10
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +1 -1
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/Cascade/Cascade.d.ts +19 -2
  18. package/es/components/Cascade/Cascade.js +12 -9
  19. package/es/components/Coachmark/CoachmarkTagline.js +1 -2
  20. package/es/components/CoachmarkStack/CoachmarkStackHome.js +1 -1
  21. package/es/components/Datagrid/Datagrid/DatagridHeaderRow.js +14 -5
  22. package/es/components/Datagrid/Datagrid/DatagridRow.js +15 -2
  23. package/es/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.d.ts +2 -0
  24. package/es/components/Datagrid/Datagrid/addons/Slug/{ColumnHeaderSlug.js → DatagridSlug.js} +4 -4
  25. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -2
  26. package/es/components/Datagrid/useSelectAllToggle.js +1 -1
  27. package/es/components/Datagrid/useSortableColumns.js +2 -2
  28. package/es/components/EmptyStates/EmptyStateContent.d.ts +1 -1
  29. package/es/components/FullPageError/FullPageError.js +41 -15
  30. package/es/components/FullPageError/assets/Error403SVG.d.ts +9 -0
  31. package/es/components/FullPageError/assets/Error403SVG.js +714 -0
  32. package/es/components/FullPageError/assets/Error404SVG.d.ts +9 -0
  33. package/es/components/FullPageError/assets/Error404SVG.js +623 -0
  34. package/es/components/HTTPErrors/HTTPErrorContent.d.ts +1 -1
  35. package/es/components/InterstitialScreen/InterstitialScreen.js +1 -1
  36. package/es/components/Tearsheet/TearsheetShell.js +16 -4
  37. package/es/components/UserAvatar/UserAvatar.js +1 -2
  38. package/es/global/js/hooks/index.d.ts +1 -0
  39. package/es/global/js/hooks/useFocus.d.ts +11 -0
  40. package/es/global/js/hooks/useFocus.js +76 -0
  41. package/lib/components/Cascade/Cascade.d.ts +19 -2
  42. package/lib/components/Cascade/Cascade.js +12 -9
  43. package/lib/components/Coachmark/CoachmarkTagline.js +3 -4
  44. package/lib/components/CoachmarkStack/CoachmarkStackHome.js +2 -2
  45. package/lib/components/Datagrid/Datagrid/DatagridHeaderRow.js +13 -4
  46. package/lib/components/Datagrid/Datagrid/DatagridRow.js +14 -1
  47. package/lib/components/Datagrid/Datagrid/addons/Slug/DatagridSlug.d.ts +2 -0
  48. package/lib/components/Datagrid/Datagrid/addons/Slug/{ColumnHeaderSlug.js → DatagridSlug.js} +4 -4
  49. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -2
  50. package/lib/components/Datagrid/useSelectAllToggle.js +1 -1
  51. package/lib/components/Datagrid/useSortableColumns.js +2 -2
  52. package/lib/components/EmptyStates/EmptyStateContent.d.ts +1 -1
  53. package/lib/components/FullPageError/FullPageError.js +41 -15
  54. package/lib/components/FullPageError/assets/Error403SVG.d.ts +9 -0
  55. package/lib/components/FullPageError/assets/Error403SVG.js +722 -0
  56. package/lib/components/FullPageError/assets/Error404SVG.d.ts +9 -0
  57. package/lib/components/FullPageError/assets/Error404SVG.js +631 -0
  58. package/lib/components/HTTPErrors/HTTPErrorContent.d.ts +1 -1
  59. package/lib/components/InterstitialScreen/InterstitialScreen.js +3 -3
  60. package/lib/components/Tearsheet/TearsheetShell.js +16 -4
  61. package/lib/components/UserAvatar/UserAvatar.js +1 -2
  62. package/lib/global/js/hooks/index.d.ts +1 -0
  63. package/lib/global/js/hooks/useFocus.d.ts +11 -0
  64. package/lib/global/js/hooks/useFocus.js +80 -0
  65. package/package.json +3 -3
  66. package/scss/components/Datagrid/styles/_datagrid.scss +19 -0
  67. package/scss/components/FilterSummary/_filter-summary.scss +1 -1
  68. package/scss/components/FullPageError/_full-page-error.scss +20 -2
  69. package/scss/components/ProductiveCard/_productive-card.scss +1 -1
  70. package/scss/components/UserAvatar/_user-avatar.scss +8 -5
  71. package/es/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.d.ts +0 -2
  72. package/es/node_modules/@carbon/icon-helpers/es/index.js +0 -140
  73. package/es/node_modules/@carbon/icons-react/es/Icon.js +0 -73
  74. package/es/node_modules/@carbon/icons-react/es/generated/bucket-0.js +0 -2985
  75. package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -2900
  76. package/es/node_modules/@carbon/icons-react/es/generated/bucket-8.js +0 -3004
  77. package/es/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -14
  78. package/lib/components/Datagrid/Datagrid/addons/Slug/ColumnHeaderSlug.d.ts +0 -2
  79. package/lib/node_modules/@carbon/icon-helpers/es/index.js +0 -145
  80. package/lib/node_modules/@carbon/icons-react/es/Icon.js +0 -81
  81. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-0.js +0 -3117
  82. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +0 -3032
  83. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-8.js +0 -3136
  84. package/lib/node_modules/@carbon/icons-react/es/iconPropTypes-4cbeb95d.js +0 -18
@@ -1,14 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 2020, 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/index.js';
9
-
10
- var iconPropTypes = {
11
- size: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
12
- };
13
-
14
- export { iconPropTypes as i };
@@ -1,2 +0,0 @@
1
- export const ColumnHeaderSlug: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- import React from 'react';
@@ -1,145 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 2020, 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 _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
13
-
14
- function ownKeys(object, enumerableOnly) {
15
- var keys = Object.keys(object);
16
- if (Object.getOwnPropertySymbols) {
17
- var symbols = Object.getOwnPropertySymbols(object);
18
- enumerableOnly && (symbols = symbols.filter(function (sym) {
19
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
20
- })), keys.push.apply(keys, symbols);
21
- }
22
- return keys;
23
- }
24
- function _objectSpread2(target) {
25
- for (var i = 1; i < arguments.length; i++) {
26
- var source = null != arguments[i] ? arguments[i] : {};
27
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
28
- _defineProperty(target, key, source[key]);
29
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
30
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
31
- });
32
- }
33
- return target;
34
- }
35
- function _defineProperty(obj, key, value) {
36
- key = _toPropertyKey(key);
37
- if (key in obj) {
38
- Object.defineProperty(obj, key, {
39
- value: value,
40
- enumerable: true,
41
- configurable: true,
42
- writable: true
43
- });
44
- } else {
45
- obj[key] = value;
46
- }
47
- return obj;
48
- }
49
- function _objectWithoutPropertiesLoose(source, excluded) {
50
- if (source == null) return {};
51
- var target = {};
52
- var sourceKeys = Object.keys(source);
53
- var key, i;
54
- for (i = 0; i < sourceKeys.length; i++) {
55
- key = sourceKeys[i];
56
- if (excluded.indexOf(key) >= 0) continue;
57
- target[key] = source[key];
58
- }
59
- return target;
60
- }
61
- function _objectWithoutProperties(source, excluded) {
62
- if (source == null) return {};
63
- var target = _objectWithoutPropertiesLoose(source, excluded);
64
- var key, i;
65
- if (Object.getOwnPropertySymbols) {
66
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
67
- for (i = 0; i < sourceSymbolKeys.length; i++) {
68
- key = sourceSymbolKeys[i];
69
- if (excluded.indexOf(key) >= 0) continue;
70
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
71
- target[key] = source[key];
72
- }
73
- }
74
- return target;
75
- }
76
- function _toPrimitive(input, hint) {
77
- if (_rollupPluginBabelHelpers["typeof"](input) !== "object" || input === null) return input;
78
- var prim = input[Symbol.toPrimitive];
79
- if (prim !== undefined) {
80
- var res = prim.call(input, hint || "default");
81
- if (_rollupPluginBabelHelpers["typeof"](res) !== "object") return res;
82
- throw new TypeError("@@toPrimitive must return a primitive value.");
83
- }
84
- return (hint === "string" ? String : Number)(input);
85
- }
86
- function _toPropertyKey(arg) {
87
- var key = _toPrimitive(arg, "string");
88
- return _rollupPluginBabelHelpers["typeof"](key) === "symbol" ? key : String(key);
89
- }
90
- var _excluded = ["width", "height", "viewBox"],
91
- _excluded2 = ["tabindex"];
92
- /**
93
- * Copyright IBM Corp. 2018, 2024
94
- *
95
- * This source code is licensed under the Apache-2.0 license found in the
96
- * LICENSE file in the root directory of this source tree.
97
- */
98
-
99
- var defaultAttributes = {
100
- // Reference:
101
- // https://github.com/IBM/carbon-components-react/issues/1392
102
- // https://github.com/PolymerElements/iron-iconset-svg/pull/47
103
- // `focusable` is a string attribute which is why we do not use a boolean here
104
- focusable: 'false',
105
- preserveAspectRatio: 'xMidYMid meet'
106
- };
107
-
108
- /**
109
- * Get supplementary HTML attributes for a given <svg> element based on existing
110
- * attributes.
111
- */
112
- function getAttributes() {
113
- var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
114
- width = _ref.width,
115
- height = _ref.height,
116
- _ref$viewBox = _ref.viewBox,
117
- viewBox = _ref$viewBox === void 0 ? "0 0 ".concat(width, " ").concat(height) : _ref$viewBox,
118
- attributes = _objectWithoutProperties(_ref, _excluded);
119
- var tabindex = attributes.tabindex,
120
- rest = _objectWithoutProperties(attributes, _excluded2);
121
- var iconAttributes = _objectSpread2(_objectSpread2(_objectSpread2({}, defaultAttributes), rest), {}, {
122
- width: width,
123
- height: height,
124
- viewBox: viewBox
125
- });
126
-
127
- // TODO: attributes.title assumes that the consumer will implement <title> and
128
- // correctly set `aria-labelledby`.
129
- if (iconAttributes['aria-label'] || iconAttributes['aria-labelledby'] || iconAttributes.title) {
130
- iconAttributes.role = 'img';
131
-
132
- // Reference:
133
- // https://allyjs.io/tutorials/focusing-in-svg.html
134
- if (tabindex !== undefined && tabindex !== null) {
135
- iconAttributes.focusable = 'true';
136
- iconAttributes.tabindex = tabindex;
137
- }
138
- } else {
139
- iconAttributes['aria-hidden'] = true;
140
- }
141
- return iconAttributes;
142
- }
143
-
144
- exports.defaultAttributes = defaultAttributes;
145
- exports.getAttributes = getAttributes;
@@ -1,81 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 2020, 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 _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
13
- var index = require('../../icon-helpers/es/index.js');
14
- var index$1 = require('../../../prop-types/index.js');
15
- var React = require('react');
16
-
17
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
-
19
- var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
20
-
21
- var _excluded = ["className", "children", "tabIndex", "xmlns", "preserveAspectRatio"],
22
- _excluded2 = ["tabindex"];
23
-
24
- /**
25
- * Copyright IBM Corp. 2019, 2023
26
- *
27
- * This source code is licensed under the Apache-2.0 license found in the
28
- * LICENSE file in the root directory of this source tree.
29
- */
30
- var Icon = /*#__PURE__*/React__default["default"].forwardRef(function Icon(_ref, ref) {
31
- var className = _ref.className,
32
- children = _ref.children,
33
- tabIndex = _ref.tabIndex,
34
- _ref$xmlns = _ref.xmlns,
35
- xmlns = _ref$xmlns === void 0 ? 'http://www.w3.org/2000/svg' : _ref$xmlns,
36
- _ref$preserveAspectRa = _ref.preserveAspectRatio,
37
- preserveAspectRatio = _ref$preserveAspectRa === void 0 ? 'xMidYMid meet' : _ref$preserveAspectRa,
38
- rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
39
- var _getAttributes = index.getAttributes(_rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, rest), {}, {
40
- tabindex: tabIndex
41
- })),
42
- tabindex = _getAttributes.tabindex,
43
- attrs = _rollupPluginBabelHelpers.objectWithoutProperties(_getAttributes, _excluded2);
44
- var props = attrs;
45
- if (className) {
46
- props.className = className;
47
- }
48
- if (tabindex !== undefined && tabindex !== null) {
49
- if (typeof tabindex === 'number') {
50
- props.tabIndex = tabindex;
51
- } else {
52
- props.tabIndex = Number(tabIndex);
53
- }
54
- }
55
- if (ref) {
56
- props.ref = ref;
57
- }
58
- if (xmlns) {
59
- props.xmlns = xmlns;
60
- }
61
- if (preserveAspectRatio) {
62
- props.preserveAspectRatio = preserveAspectRatio;
63
- }
64
- return /*#__PURE__*/React__default["default"].createElement('svg', props, children);
65
- });
66
- Icon.displayName = 'Icon';
67
- Icon.propTypes = {
68
- 'aria-hidden': index$1["default"].oneOfType([index$1["default"].bool, index$1["default"].oneOf(['true', 'false'])]),
69
- 'aria-label': index$1["default"].string,
70
- 'aria-labelledby': index$1["default"].string,
71
- children: index$1["default"].node,
72
- className: index$1["default"].string,
73
- height: index$1["default"].oneOfType([index$1["default"].number, index$1["default"].string]),
74
- preserveAspectRatio: index$1["default"].string,
75
- tabIndex: index$1["default"].oneOfType([index$1["default"].number, index$1["default"].string]),
76
- viewBox: index$1["default"].string,
77
- width: index$1["default"].oneOfType([index$1["default"].number, index$1["default"].string]),
78
- xmlns: index$1["default"].string
79
- };
80
-
81
- exports["default"] = Icon;