@carbon/ibm-products 1.1.0 → 1.2.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/README.md +1 -1
- package/css/index-full-carbon.css +7 -63
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-without-carbon-released-only.css +7 -0
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon.css +7 -63
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index.css +7 -63
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/es/components/Card/Card.js +18 -4
- package/es/components/ExpressiveCard/ExpressiveCard.js +3 -2
- package/es/components/ProductiveCard/ProductiveCard.js +3 -2
- package/es/components/index.js +0 -1
- package/es/global/js/package-settings.js +0 -1
- package/es/global/js/utils/story-helper.js +1 -1
- package/lib/components/Card/Card.js +18 -4
- package/lib/components/ExpressiveCard/ExpressiveCard.js +3 -2
- package/lib/components/ProductiveCard/ProductiveCard.js +3 -2
- package/lib/components/index.js +0 -8
- package/lib/global/js/package-settings.js +0 -1
- package/lib/global/js/utils/story-helper.js +1 -1
- package/package.json +2 -2
- package/scss/components/Card/_card.scss +1 -0
- package/scss/components/ProductiveCard/_productive-card.scss +4 -0
- package/scss/components/Tearsheet/_tearsheet.scss +6 -0
- package/scss/components/_index.scss +0 -1
@@ -87,7 +87,8 @@ export var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
87
87
|
Icon = _ref3.icon,
|
88
88
|
onClick = _ref3.onClick,
|
89
89
|
iconDescription = _ref3.iconDescription,
|
90
|
-
onKeyDown = _ref3.onKeyDown
|
90
|
+
onKeyDown = _ref3.onKeyDown,
|
91
|
+
href = _ref3.href;
|
91
92
|
|
92
93
|
if (productive) {
|
93
94
|
return /*#__PURE__*/React.createElement(Button, {
|
@@ -97,10 +98,22 @@ export var Card = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
97
98
|
onClick: onClick,
|
98
99
|
size: actionsPlacement === 'top' ? 'sm' : 'field',
|
99
100
|
iconDescription: iconDescription,
|
100
|
-
kind: "ghost"
|
101
|
+
kind: "ghost",
|
102
|
+
href: href
|
101
103
|
});
|
102
104
|
}
|
103
105
|
|
106
|
+
if (href) {
|
107
|
+
return /*#__PURE__*/React.createElement("a", {
|
108
|
+
key: id,
|
109
|
+
className: "".concat(blockClass, "__icon"),
|
110
|
+
href: href,
|
111
|
+
onClick: onClick
|
112
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
113
|
+
"aria-label": iconDescription
|
114
|
+
}));
|
115
|
+
}
|
116
|
+
|
104
117
|
return /*#__PURE__*/React.createElement("div", {
|
105
118
|
key: id,
|
106
119
|
className: "".concat(blockClass, "__icon"),
|
@@ -195,7 +208,8 @@ Card.propTypes = {
|
|
195
208
|
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
196
209
|
onKeyDown: PropTypes.func,
|
197
210
|
onClick: PropTypes.func,
|
198
|
-
iconDescription: PropTypes.string
|
211
|
+
iconDescription: PropTypes.string,
|
212
|
+
href: PropTypes.string
|
199
213
|
})),
|
200
214
|
actionsPlacement: PropTypes.oneOf(['top', 'bottom']),
|
201
215
|
children: PropTypes.node,
|
@@ -219,7 +233,7 @@ Card.propTypes = {
|
|
219
233
|
primaryButtonHref: PropTypes.string,
|
220
234
|
primaryButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
221
235
|
primaryButtonKind: PropTypes.oneOf(['primary', 'ghost']),
|
222
|
-
primaryButtonText: PropTypes.
|
236
|
+
primaryButtonText: PropTypes.node,
|
223
237
|
productive: PropTypes.bool,
|
224
238
|
secondaryButtonHref: PropTypes.string,
|
225
239
|
secondaryButtonIcon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
@@ -22,14 +22,15 @@ export var ExpressiveCard = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
22
22
|
ExpressiveCard = pkg.checkComponentEnabled(ExpressiveCard, componentName);
|
23
23
|
ExpressiveCard.propTypes = {
|
24
24
|
/**
|
25
|
-
* Icons that are displayed on card. Refer to design documentation for implementation guidelines
|
25
|
+
* Icons that are displayed on card. Refer to design documentation for implementation guidelines. Note- href will supersede onClick
|
26
26
|
*/
|
27
27
|
actionIcons: PropTypes.arrayOf(PropTypes.shape({
|
28
28
|
id: PropTypes.string,
|
29
29
|
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
30
30
|
onKeyDown: PropTypes.func,
|
31
31
|
onClick: PropTypes.func,
|
32
|
-
iconDescription: PropTypes.string
|
32
|
+
iconDescription: PropTypes.string,
|
33
|
+
href: PropTypes.string
|
33
34
|
})),
|
34
35
|
|
35
36
|
/**
|
@@ -30,7 +30,8 @@ ProductiveCard.propTypes = {
|
|
30
30
|
icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
31
31
|
onKeyDown: PropTypes.func,
|
32
32
|
onClick: PropTypes.func,
|
33
|
-
iconDescription: PropTypes.string
|
33
|
+
iconDescription: PropTypes.string,
|
34
|
+
href: PropTypes.string
|
34
35
|
})),
|
35
36
|
|
36
37
|
/**
|
@@ -96,7 +97,7 @@ ProductiveCard.propTypes = {
|
|
96
97
|
/**
|
97
98
|
* The text that's displayed in the primary button
|
98
99
|
*/
|
99
|
-
primaryButtonText: PropTypes.
|
100
|
+
primaryButtonText: PropTypes.node,
|
100
101
|
|
101
102
|
/**
|
102
103
|
* Title that's displayed at the top of the card
|
package/es/components/index.js
CHANGED
@@ -14,7 +14,6 @@ export { CreateSidePanel } from './CreateSidePanel';
|
|
14
14
|
export { CreateTearsheet, CreateTearsheetStep, CreateTearsheetDivider } from './CreateTearsheet';
|
15
15
|
export { CreateTearsheetNarrow } from './CreateTearsheetNarrow';
|
16
16
|
export { EmptyState, ErrorEmptyState, NoDataEmptyState, NoTagsEmptyState, NotFoundEmptyState, NotificationsEmptyState, UnauthorizedEmptyState } from './EmptyStates';
|
17
|
-
export { ExampleComponent } from './ExampleComponent';
|
18
17
|
export { ExportModal } from './ExportModal';
|
19
18
|
export { ExpressiveCard } from './ExpressiveCard';
|
20
19
|
export { HTTPError403, HTTPError404, HTTPErrorOther } from './HTTPErrors';
|
@@ -61,7 +61,7 @@ export var prepareStory = function prepareStory(template, options) {
|
|
61
61
|
export var CodesandboxLink = function CodesandboxLink(_ref) {
|
62
62
|
var exampleDirectory = _ref.exampleDirectory;
|
63
63
|
return /*#__PURE__*/React.createElement("a", {
|
64
|
-
href: "https://codesandbox.io/s/github/carbon-design-system/ibm-cloud-cognitive/tree/main/examples/
|
64
|
+
href: "https://codesandbox.io/s/github/carbon-design-system/ibm-cloud-cognitive/tree/main/examples/carbon-for-ibm-products/".concat(exampleDirectory)
|
65
65
|
}, /*#__PURE__*/React.createElement("img", {
|
66
66
|
alt: "Edit on CodeSandbox",
|
67
67
|
src: "https://codesandbox.io/static/img/play-codesandbox.svg"
|
@@ -104,7 +104,8 @@ var Card = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
104
104
|
Icon = _ref3.icon,
|
105
105
|
onClick = _ref3.onClick,
|
106
106
|
iconDescription = _ref3.iconDescription,
|
107
|
-
onKeyDown = _ref3.onKeyDown
|
107
|
+
onKeyDown = _ref3.onKeyDown,
|
108
|
+
href = _ref3.href;
|
108
109
|
|
109
110
|
if (productive) {
|
110
111
|
return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Button, {
|
@@ -114,10 +115,22 @@ var Card = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
114
115
|
onClick: onClick,
|
115
116
|
size: actionsPlacement === 'top' ? 'sm' : 'field',
|
116
117
|
iconDescription: iconDescription,
|
117
|
-
kind: "ghost"
|
118
|
+
kind: "ghost",
|
119
|
+
href: href
|
118
120
|
});
|
119
121
|
}
|
120
122
|
|
123
|
+
if (href) {
|
124
|
+
return /*#__PURE__*/_react.default.createElement("a", {
|
125
|
+
key: id,
|
126
|
+
className: "".concat(blockClass, "__icon"),
|
127
|
+
href: href,
|
128
|
+
onClick: onClick
|
129
|
+
}, /*#__PURE__*/_react.default.createElement(Icon, {
|
130
|
+
"aria-label": iconDescription
|
131
|
+
}));
|
132
|
+
}
|
133
|
+
|
121
134
|
return /*#__PURE__*/_react.default.createElement("div", {
|
122
135
|
key: id,
|
123
136
|
className: "".concat(blockClass, "__icon"),
|
@@ -213,7 +226,8 @@ Card.propTypes = {
|
|
213
226
|
icon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
214
227
|
onKeyDown: _propTypes.default.func,
|
215
228
|
onClick: _propTypes.default.func,
|
216
|
-
iconDescription: _propTypes.default.string
|
229
|
+
iconDescription: _propTypes.default.string,
|
230
|
+
href: _propTypes.default.string
|
217
231
|
})),
|
218
232
|
actionsPlacement: _propTypes.default.oneOf(['top', 'bottom']),
|
219
233
|
children: _propTypes.default.node,
|
@@ -237,7 +251,7 @@ Card.propTypes = {
|
|
237
251
|
primaryButtonHref: _propTypes.default.string,
|
238
252
|
primaryButtonIcon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
239
253
|
primaryButtonKind: _propTypes.default.oneOf(['primary', 'ghost']),
|
240
|
-
primaryButtonText: _propTypes.default.
|
254
|
+
primaryButtonText: _propTypes.default.node,
|
241
255
|
productive: _propTypes.default.bool,
|
242
256
|
secondaryButtonHref: _propTypes.default.string,
|
243
257
|
secondaryButtonIcon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
@@ -45,14 +45,15 @@ exports.ExpressiveCard = ExpressiveCard;
|
|
45
45
|
exports.ExpressiveCard = ExpressiveCard = _settings.pkg.checkComponentEnabled(ExpressiveCard, componentName);
|
46
46
|
ExpressiveCard.propTypes = {
|
47
47
|
/**
|
48
|
-
* Icons that are displayed on card. Refer to design documentation for implementation guidelines
|
48
|
+
* Icons that are displayed on card. Refer to design documentation for implementation guidelines. Note- href will supersede onClick
|
49
49
|
*/
|
50
50
|
actionIcons: _propTypes.default.arrayOf(_propTypes.default.shape({
|
51
51
|
id: _propTypes.default.string,
|
52
52
|
icon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
53
53
|
onKeyDown: _propTypes.default.func,
|
54
54
|
onClick: _propTypes.default.func,
|
55
|
-
iconDescription: _propTypes.default.string
|
55
|
+
iconDescription: _propTypes.default.string,
|
56
|
+
href: _propTypes.default.string
|
56
57
|
})),
|
57
58
|
|
58
59
|
/**
|
@@ -53,7 +53,8 @@ ProductiveCard.propTypes = {
|
|
53
53
|
icon: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
54
54
|
onKeyDown: _propTypes.default.func,
|
55
55
|
onClick: _propTypes.default.func,
|
56
|
-
iconDescription: _propTypes.default.string
|
56
|
+
iconDescription: _propTypes.default.string,
|
57
|
+
href: _propTypes.default.string
|
57
58
|
})),
|
58
59
|
|
59
60
|
/**
|
@@ -119,7 +120,7 @@ ProductiveCard.propTypes = {
|
|
119
120
|
/**
|
120
121
|
* The text that's displayed in the primary button
|
121
122
|
*/
|
122
|
-
primaryButtonText: _propTypes.default.
|
123
|
+
primaryButtonText: _propTypes.default.node,
|
123
124
|
|
124
125
|
/**
|
125
126
|
* Title that's displayed at the top of the card
|
package/lib/components/index.js
CHANGED
@@ -99,12 +99,6 @@ Object.defineProperty(exports, "ErrorEmptyState", {
|
|
99
99
|
return _EmptyStates.ErrorEmptyState;
|
100
100
|
}
|
101
101
|
});
|
102
|
-
Object.defineProperty(exports, "ExampleComponent", {
|
103
|
-
enumerable: true,
|
104
|
-
get: function get() {
|
105
|
-
return _ExampleComponent.ExampleComponent;
|
106
|
-
}
|
107
|
-
});
|
108
102
|
Object.defineProperty(exports, "ExportModal", {
|
109
103
|
enumerable: true,
|
110
104
|
get: function get() {
|
@@ -300,8 +294,6 @@ var _CreateTearsheetNarrow = require("./CreateTearsheetNarrow");
|
|
300
294
|
|
301
295
|
var _EmptyStates = require("./EmptyStates");
|
302
296
|
|
303
|
-
var _ExampleComponent = require("./ExampleComponent");
|
304
|
-
|
305
297
|
var _ExportModal = require("./ExportModal");
|
306
298
|
|
307
299
|
var _ExpressiveCard = require("./ExpressiveCard");
|
@@ -84,7 +84,7 @@ exports.prepareStory = prepareStory;
|
|
84
84
|
var CodesandboxLink = function CodesandboxLink(_ref) {
|
85
85
|
var exampleDirectory = _ref.exampleDirectory;
|
86
86
|
return /*#__PURE__*/_react.default.createElement("a", {
|
87
|
-
href: "https://codesandbox.io/s/github/carbon-design-system/ibm-cloud-cognitive/tree/main/examples/
|
87
|
+
href: "https://codesandbox.io/s/github/carbon-design-system/ibm-cloud-cognitive/tree/main/examples/carbon-for-ibm-products/".concat(exampleDirectory)
|
88
88
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
89
89
|
alt: "Edit on CodeSandbox",
|
90
90
|
src: "https://codesandbox.io/static/img/play-codesandbox.svg"
|
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": "1.
|
4
|
+
"version": "1.2.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -86,5 +86,5 @@
|
|
86
86
|
"react": "^16.8.6 || ^17.0.1",
|
87
87
|
"react-dom": "^16.8.6 || ^17.0.1"
|
88
88
|
},
|
89
|
-
"gitHead": "
|
89
|
+
"gitHead": "2d73283440932eacac0047223791c6590599d0db"
|
90
90
|
}
|
@@ -225,6 +225,12 @@
|
|
225
225
|
flex: 0 0 257px; // influencer width 256px plus 1px border
|
226
226
|
border-right: 1px solid $ui-03;
|
227
227
|
overflow-y: auto;
|
228
|
+
|
229
|
+
// the normal 80% content width inside modals should not apply to influencer content
|
230
|
+
// apply the class again for higher specificity
|
231
|
+
&.#{$block-class}__influencer p {
|
232
|
+
padding-right: 0;
|
233
|
+
}
|
228
234
|
}
|
229
235
|
|
230
236
|
.#{$block-class}__influencer--wide {
|