@carbon/ibm-products 2.54.0-canary.4 → 2.54.0-canary.7
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.
@@ -8,7 +8,7 @@
|
|
8
8
|
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends, objectSpread2 as _objectSpread2, defineProperty as _defineProperty } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { forwardRef } from 'react';
|
10
10
|
import cx from 'classnames';
|
11
|
-
import { Layer, OverflowMenu,
|
11
|
+
import { Layer, unstable_FeatureFlags, OverflowMenu, MenuItem, Button, IconButton } from '@carbon/react';
|
12
12
|
import { Incomplete, CheckmarkOutline } from '@carbon/react/icons';
|
13
13
|
import PropTypes from '../../_virtual/index.js';
|
14
14
|
import { CardHeader } from './CardHeader.js';
|
@@ -17,7 +17,7 @@ import { pkg } from '../../settings.js';
|
|
17
17
|
|
18
18
|
var _Incomplete, _CheckmarkOutline;
|
19
19
|
var _excluded = ["actionIcons", "actionsPlacement", "aiLabel", "metadata", "children", "className", "clickZone", "description", "disabled", "footerActionIcon", "getStarted", "label", "media", "mediaPosition", "onClick", "onKeyDown", "onPrimaryButtonClick", "overflowActions", "overflowAriaLabel", "onSecondaryButtonClick", "pictogram", "primaryButtonDisabled", "primaryButtonHref", "primaryButtonIcon", "primaryButtonKind", "primaryButtonPlacement", "primaryButtonText", "productive", "secondaryButtonDisabled", "secondaryButtonHref", "secondaryButtonIcon", "secondaryButtonKind", "secondaryButtonPlacement", "secondaryButtonText", "slug", "status", "sequence", "title", "titleSize", "iconDescription"],
|
20
|
-
_excluded2 = ["id"],
|
20
|
+
_excluded2 = ["id", "itemText"],
|
21
21
|
_excluded3 = ["id", "icon", "onClick", "iconDescription", "href"];
|
22
22
|
var componentName = 'Card';
|
23
23
|
var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
@@ -95,23 +95,27 @@ var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
95
95
|
// actions can either be an overflow menu or series of icons
|
96
96
|
var getActions = function getActions() {
|
97
97
|
if (overflowActions.length > 0) {
|
98
|
-
var pos = actionsPlacement === 'top' ? 'bottom' : 'top';
|
98
|
+
var pos = actionsPlacement === 'top' ? 'bottom-end' : 'top-end';
|
99
99
|
var size = actionsPlacement === 'top' ? 'sm' : 'md';
|
100
100
|
return /*#__PURE__*/React__default.createElement(Layer, {
|
101
101
|
level: 2
|
102
|
+
}, /*#__PURE__*/React__default.createElement(unstable_FeatureFlags, {
|
103
|
+
enableV12Overflowmenu: true
|
102
104
|
}, /*#__PURE__*/React__default.createElement(OverflowMenu, {
|
105
|
+
autoAlign: true,
|
106
|
+
menuAlignment: pos,
|
103
107
|
size: size,
|
104
|
-
direction: pos,
|
105
|
-
flipped: true,
|
106
108
|
"aria-label": overflowAriaLabel,
|
107
|
-
|
109
|
+
label: iconDescription
|
108
110
|
}, overflowActions.map(function (_ref2) {
|
109
111
|
var id = _ref2.id,
|
112
|
+
itemText = _ref2.itemText,
|
110
113
|
rest = _objectWithoutProperties(_ref2, _excluded2);
|
111
|
-
return /*#__PURE__*/React__default.createElement(
|
112
|
-
key: id
|
114
|
+
return /*#__PURE__*/React__default.createElement(MenuItem, _extends({
|
115
|
+
key: id,
|
116
|
+
label: itemText
|
113
117
|
}, rest));
|
114
|
-
})));
|
118
|
+
}))));
|
115
119
|
}
|
116
120
|
var icons = getIcons().map(function (_ref3) {
|
117
121
|
var id = _ref3.id,
|
@@ -19,7 +19,7 @@ var settings = require('../../settings.js');
|
|
19
19
|
|
20
20
|
var _Incomplete, _CheckmarkOutline;
|
21
21
|
var _excluded = ["actionIcons", "actionsPlacement", "aiLabel", "metadata", "children", "className", "clickZone", "description", "disabled", "footerActionIcon", "getStarted", "label", "media", "mediaPosition", "onClick", "onKeyDown", "onPrimaryButtonClick", "overflowActions", "overflowAriaLabel", "onSecondaryButtonClick", "pictogram", "primaryButtonDisabled", "primaryButtonHref", "primaryButtonIcon", "primaryButtonKind", "primaryButtonPlacement", "primaryButtonText", "productive", "secondaryButtonDisabled", "secondaryButtonHref", "secondaryButtonIcon", "secondaryButtonKind", "secondaryButtonPlacement", "secondaryButtonText", "slug", "status", "sequence", "title", "titleSize", "iconDescription"],
|
22
|
-
_excluded2 = ["id"],
|
22
|
+
_excluded2 = ["id", "itemText"],
|
23
23
|
_excluded3 = ["id", "icon", "onClick", "iconDescription", "href"];
|
24
24
|
var componentName = 'Card';
|
25
25
|
var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
@@ -97,23 +97,27 @@ var Card = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
97
97
|
// actions can either be an overflow menu or series of icons
|
98
98
|
var getActions = function getActions() {
|
99
99
|
if (overflowActions.length > 0) {
|
100
|
-
var pos = actionsPlacement === 'top' ? 'bottom' : 'top';
|
100
|
+
var pos = actionsPlacement === 'top' ? 'bottom-end' : 'top-end';
|
101
101
|
var size = actionsPlacement === 'top' ? 'sm' : 'md';
|
102
102
|
return /*#__PURE__*/React.createElement(react.Layer, {
|
103
103
|
level: 2
|
104
|
+
}, /*#__PURE__*/React.createElement(react.unstable_FeatureFlags, {
|
105
|
+
enableV12Overflowmenu: true
|
104
106
|
}, /*#__PURE__*/React.createElement(react.OverflowMenu, {
|
107
|
+
autoAlign: true,
|
108
|
+
menuAlignment: pos,
|
105
109
|
size: size,
|
106
|
-
direction: pos,
|
107
|
-
flipped: true,
|
108
110
|
"aria-label": overflowAriaLabel,
|
109
|
-
|
111
|
+
label: iconDescription
|
110
112
|
}, overflowActions.map(function (_ref2) {
|
111
113
|
var id = _ref2.id,
|
114
|
+
itemText = _ref2.itemText,
|
112
115
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref2, _excluded2);
|
113
|
-
return /*#__PURE__*/React.createElement(react.
|
114
|
-
key: id
|
116
|
+
return /*#__PURE__*/React.createElement(react.MenuItem, _rollupPluginBabelHelpers.extends({
|
117
|
+
key: id,
|
118
|
+
label: itemText
|
115
119
|
}, rest));
|
116
|
-
})));
|
120
|
+
}))));
|
117
121
|
}
|
118
122
|
var icons = getIcons().map(function (_ref3) {
|
119
123
|
var id = _ref3.id,
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.54.0-canary.
|
4
|
+
"version": "2.54.0-canary.7+42a1362ad",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -89,7 +89,7 @@
|
|
89
89
|
"rimraf": "^5.0.5",
|
90
90
|
"rollup": "^3.29.5",
|
91
91
|
"rollup-plugin-strip-banner": "^3.0.0",
|
92
|
-
"sass": "^1.
|
92
|
+
"sass": "^1.80.6",
|
93
93
|
"typescript-config-carbon": "^0.3.0",
|
94
94
|
"yargs": "^17.7.2"
|
95
95
|
},
|
@@ -120,5 +120,5 @@
|
|
120
120
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0",
|
121
121
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0"
|
122
122
|
},
|
123
|
-
"gitHead": "
|
123
|
+
"gitHead": "42a1362ad2ff4998f8286ed0698a82c4ec8ea552"
|
124
124
|
}
|