@carbon/ibm-products 0.99.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +895 -922
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +8 -8
- package/css/index-without-carbon-released-only.css +808 -796
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +8 -8
- package/css/index-without-carbon.css +895 -922
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +8 -8
- package/css/index.css +895 -922
- package/css/index.css.map +1 -1
- package/css/index.min.css +8 -8
- package/es/components/ActionBar/ActionBar.js +11 -36
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +42 -115
- package/es/components/CreateSidePanel/CreateSidePanel.js +5 -17
- package/es/components/PageHeader/PageHeader.js +17 -100
- package/es/components/SidePanel/SidePanel.js +13 -28
- package/es/components/Tearsheet/Tearsheet.js +1 -10
- package/es/components/Tearsheet/TearsheetNarrow.js +1 -10
- package/es/components/Tearsheet/TearsheetShell.js +0 -10
- package/es/components/UserProfileImage/UserProfileImage.js +1 -1
- package/es/components/index.js +0 -1
- package/es/global/js/package-settings.js +1 -2
- package/lib/components/ActionBar/ActionBar.js +11 -37
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +44 -116
- package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -19
- package/lib/components/PageHeader/PageHeader.js +16 -99
- package/lib/components/SidePanel/SidePanel.js +13 -29
- package/lib/components/Tearsheet/Tearsheet.js +0 -9
- package/lib/components/Tearsheet/TearsheetNarrow.js +0 -9
- package/lib/components/Tearsheet/TearsheetShell.js +0 -11
- package/lib/components/UserProfileImage/UserProfileImage.js +1 -1
- package/lib/components/index.js +0 -8
- package/lib/global/js/package-settings.js +1 -2
- package/package.json +2 -2
- package/scss/components/PageHeader/_page-header.scss +26 -5
- package/scss/components/UserProfileImage/_user-profile-image.scss +2 -2
- package/scss/components/_index.scss +0 -1
- package/scss/global/styles/_project-settings.scss +1 -1
- package/es/components/ContextHeader/ContextHeader.js +0 -46
- package/es/components/ContextHeader/index.js +0 -7
- package/lib/components/ContextHeader/ContextHeader.js +0 -62
- package/lib/components/ContextHeader/index.js +0 -15
- package/scss/components/ContextHeader/_context-header.scss +0 -43
- package/scss/components/ContextHeader/_index.scss +0 -8
@@ -7,7 +7,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
7
7
|
Object.defineProperty(exports, "__esModule", {
|
8
8
|
value: true
|
9
9
|
});
|
10
|
-
exports.
|
10
|
+
exports.SidePanel = void 0;
|
11
11
|
|
12
12
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
13
13
|
|
@@ -45,8 +45,8 @@ var _iconsReact = require("@carbon/icons-react");
|
|
45
45
|
|
46
46
|
var _ActionSet = require("../ActionSet");
|
47
47
|
|
48
|
-
var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "
|
49
|
-
_excluded2 = ["label", "kind", "icon", "leading", "disabled", "className", "onClick"
|
48
|
+
var _excluded = ["actionToolbarButtons", "actions", "animateTitle", "children", "className", "closeIconDescription", "condensedActions", "currentStep", "includeOverlay", "labelText", "navigationBackIconDescription", "onNavigationBack", "onRequestClose", "onUnmount", "open", "placement", "preventCloseOnClickOutside", "selectorPageContent", "selectorPrimaryFocus", "size", "slideIn", "subtitle", "title"],
|
49
|
+
_excluded2 = ["label", "kind", "icon", "leading", "disabled", "className", "onClick"];
|
50
50
|
|
51
51
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
52
52
|
|
@@ -81,7 +81,6 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
81
81
|
onRequestClose = _ref.onRequestClose,
|
82
82
|
onUnmount = _ref.onUnmount,
|
83
83
|
open = _ref.open,
|
84
|
-
pageContentSelector = _ref.pageContentSelector,
|
85
84
|
placement = _ref.placement,
|
86
85
|
preventCloseOnClickOutside = _ref.preventCloseOnClickOutside,
|
87
86
|
selectorPageContent = _ref.selectorPageContent,
|
@@ -342,7 +341,7 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
342
341
|
|
343
342
|
(0, _react.useEffect)(function () {
|
344
343
|
if (!open && slideIn) {
|
345
|
-
var pageContentElement = document.querySelector(selectorPageContent
|
344
|
+
var pageContentElement = document.querySelector(selectorPageContent);
|
346
345
|
|
347
346
|
if (placement && placement === 'right' && pageContentElement) {
|
348
347
|
pageContentElement.style.marginRight = 0;
|
@@ -350,11 +349,11 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
350
349
|
pageContentElement.style.marginLeft = 0;
|
351
350
|
}
|
352
351
|
}
|
353
|
-
}, [open, placement, selectorPageContent,
|
352
|
+
}, [open, placement, selectorPageContent, slideIn]); // used to set margins of content for slide in panel version
|
354
353
|
|
355
354
|
(0, _react.useEffect)(function () {
|
356
355
|
if (shouldRender && slideIn) {
|
357
|
-
var pageContentElement = document.querySelector(selectorPageContent
|
356
|
+
var pageContentElement = document.querySelector(selectorPageContent);
|
358
357
|
|
359
358
|
if (placement && placement === 'right' && pageContentElement) {
|
360
359
|
pageContentElement.style.marginRight = 0;
|
@@ -366,7 +365,7 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
366
365
|
pageContentElement.style.marginLeft = _constants.SIDE_PANEL_SIZES[size];
|
367
366
|
}
|
368
367
|
}
|
369
|
-
}, [slideIn, selectorPageContent,
|
368
|
+
}, [slideIn, selectorPageContent, placement, shouldRender, size]); // adds focus trap functionality
|
370
369
|
|
371
370
|
/* istanbul ignore next */
|
372
371
|
|
@@ -427,8 +426,7 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
427
426
|
leading = _ref5.leading,
|
428
427
|
disabled = _ref5.disabled,
|
429
428
|
className = _ref5.className,
|
430
|
-
|
431
|
-
onActionToolbarButtonClick = _ref5.onActionToolbarButtonClick,
|
429
|
+
onClick = _ref5.onClick,
|
432
430
|
rest = (0, _objectWithoutProperties2.default)(_ref5, _excluded2);
|
433
431
|
return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Button, (0, _extends2.default)({}, rest, {
|
434
432
|
key: label,
|
@@ -441,9 +439,7 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
441
439
|
hasIconOnly: !leading,
|
442
440
|
disabled: disabled,
|
443
441
|
className: (0, _classnames.default)(["".concat(blockClass, "__action-toolbar-button"), className, (_ref6 = {}, (0, _defineProperty2.default)(_ref6, "".concat(blockClass, "__action-toolbar-icon-only-button"), icon && !leading), (0, _defineProperty2.default)(_ref6, "".concat(blockClass, "__action-toolbar-leading-button"), leading), _ref6)]),
|
444
|
-
onClick:
|
445
|
-
return _onClick ? _onClick(event) : onActionToolbarButtonClick && onActionToolbarButtonClick(event);
|
446
|
-
}
|
442
|
+
onClick: onClick
|
447
443
|
}), leading && label);
|
448
444
|
})));
|
449
445
|
};
|
@@ -511,17 +507,7 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
511
507
|
|
512
508
|
exports.SidePanel = SidePanel;
|
513
509
|
exports.SidePanel = SidePanel = _settings.pkg.checkComponentEnabled(SidePanel, componentName);
|
514
|
-
|
515
|
-
/**
|
516
|
-
* **Deprecated**
|
517
|
-
*
|
518
|
-
* This is the selector to the element that contains all of the page content that will shrink if the panel is a slide in.
|
519
|
-
* This prop is required when using the `slideIn` variant of the side panel.
|
520
|
-
*/
|
521
|
-
pageContentSelector: (0, _propsHelper.deprecateProp)(_propTypes.default.string, 'This prop has been renamed to `selectorPageContent`.')
|
522
|
-
};
|
523
|
-
exports.deprecatedProps = deprecatedProps;
|
524
|
-
SidePanel.propTypes = _objectSpread({
|
510
|
+
SidePanel.propTypes = {
|
525
511
|
/**
|
526
512
|
* Sets the action toolbar buttons
|
527
513
|
*/
|
@@ -529,7 +515,6 @@ SidePanel.propTypes = _objectSpread({
|
|
529
515
|
label: _propTypes.default.string,
|
530
516
|
leading: _propTypes.default.bool,
|
531
517
|
icon: _propTypes.default.object,
|
532
|
-
onActionToolbarButtonClick: (0, _propsHelper.deprecateProp)(_propTypes.default.func, 'This prop will be removed in the future. Please use `onClick` instead'),
|
533
518
|
onClick: _propTypes.default.func,
|
534
519
|
kind: _propTypes.default.oneOf(['ghost', 'tertiary', 'secondary', 'primary'])
|
535
520
|
})),
|
@@ -637,9 +622,8 @@ SidePanel.propTypes = _objectSpread({
|
|
637
622
|
* This prop is required when using the `slideIn` variant of the side panel.
|
638
623
|
*/
|
639
624
|
selectorPageContent: _propTypes.default.string.isRequired.if(function (_ref7) {
|
640
|
-
var slideIn = _ref7.slideIn
|
641
|
-
|
642
|
-
return slideIn && !pageContentSelector;
|
625
|
+
var slideIn = _ref7.slideIn;
|
626
|
+
return slideIn;
|
643
627
|
}),
|
644
628
|
|
645
629
|
/**
|
@@ -670,7 +654,7 @@ SidePanel.propTypes = _objectSpread({
|
|
670
654
|
var labelText = _ref8.labelText;
|
671
655
|
return labelText;
|
672
656
|
})
|
673
|
-
}
|
657
|
+
};
|
674
658
|
SidePanel.defaultProps = {
|
675
659
|
animateTitle: true,
|
676
660
|
placement: 'right',
|
@@ -60,15 +60,6 @@ exports.Tearsheet = Tearsheet = _settings.pkg.checkComponentEnabled(Tearsheet, c
|
|
60
60
|
|
61
61
|
Tearsheet.displayName = componentName;
|
62
62
|
var deprecatedProps = {
|
63
|
-
/**
|
64
|
-
* **Deprecated**
|
65
|
-
*
|
66
|
-
* Prevent the tearsheet from automatically closing (triggering onClose, if
|
67
|
-
* provided, which can be cancelled by returning 'false') if the user clicks
|
68
|
-
* outside it.
|
69
|
-
*/
|
70
|
-
preventCloseOnClickOutside: (0, _propsHelper.deprecateProp)(_propTypes.default.bool, 'The tearsheet will close automatically if the user clicks outside it if and only if the tearsheet is passive (no navigation actions)'),
|
71
|
-
|
72
63
|
/**
|
73
64
|
* **Deprecated**
|
74
65
|
*
|
@@ -56,15 +56,6 @@ exports.TearsheetNarrow = TearsheetNarrow = _settings.pkg.checkComponentEnabled(
|
|
56
56
|
|
57
57
|
TearsheetNarrow.displayName = componentName;
|
58
58
|
var deprecatedProps = {
|
59
|
-
/**
|
60
|
-
* **Deprecated**
|
61
|
-
*
|
62
|
-
* Prevent the tearsheet from automatically closing (triggering onClose, if
|
63
|
-
* provided, which can be cancelled by returning 'false') if the user clicks
|
64
|
-
* outside it.
|
65
|
-
*/
|
66
|
-
preventCloseOnClickOutside: (0, _propsHelper.deprecateProp)(_propTypes.default.bool, 'The tearsheet will close automatically if the user clicks outside it if and only if the tearsheet is passive (no navigation actions)'),
|
67
|
-
|
68
59
|
/**
|
69
60
|
* **Deprecated**
|
70
61
|
*
|
@@ -27,8 +27,6 @@ var _classnames = _interopRequireDefault(require("classnames"));
|
|
27
27
|
|
28
28
|
var _settings = require("../../settings");
|
29
29
|
|
30
|
-
var _propsHelper = require("../../global/js/utils/props-helper");
|
31
|
-
|
32
30
|
var _pconsole = _interopRequireDefault(require("../../global/js/utils/pconsole"));
|
33
31
|
|
34
32
|
var _carbonComponentsReact = require("carbon-components-react");
|
@@ -279,15 +277,6 @@ var TearsheetShell = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref)
|
|
279
277
|
exports.TearsheetShell = TearsheetShell;
|
280
278
|
TearsheetShell.displayName = componentName;
|
281
279
|
var deprecatedProps = {
|
282
|
-
/**
|
283
|
-
* **Deprecated**
|
284
|
-
*
|
285
|
-
* Prevent the tearsheet from automatically closing (triggering onClose, if
|
286
|
-
* provided, which can be cancelled by returning 'false') if the user clicks
|
287
|
-
* outside it.
|
288
|
-
*/
|
289
|
-
preventCloseOnClickOutside: (0, _propsHelper.deprecateProp)(_propTypes.default.bool, 'The tearsheet will close automatically if the user clicks outside it if and only if the tearsheet is passive (no navigation actions)'),
|
290
|
-
|
291
280
|
/**
|
292
281
|
* **Deprecated**
|
293
282
|
*
|
@@ -29,7 +29,7 @@ var _carbonComponentsReact = require("carbon-components-react");
|
|
29
29
|
|
30
30
|
var _excluded = ["backgroundColor", "className", "kind", "initials", "image", "imageDescription", "size", "theme", "tooltipText"];
|
31
31
|
// The block part of our conventional BEM class names (blockClass__E--M).
|
32
|
-
var blockClass = "".concat(_settings.pkg.prefix, "
|
32
|
+
var blockClass = "".concat(_settings.pkg.prefix, "--user-profile-image");
|
33
33
|
var componentName = 'UserProfileImage'; // NOTE: the component SCSS is not imported here: it is rolled up separately.
|
34
34
|
|
35
35
|
/**
|
package/lib/components/index.js
CHANGED
@@ -33,12 +33,6 @@ Object.defineProperty(exports, "ComboButtonItem", {
|
|
33
33
|
return _ComboButton.ComboButtonItem;
|
34
34
|
}
|
35
35
|
});
|
36
|
-
Object.defineProperty(exports, "ContextHeader", {
|
37
|
-
enumerable: true,
|
38
|
-
get: function get() {
|
39
|
-
return _ContextHeader.ContextHeader;
|
40
|
-
}
|
41
|
-
});
|
42
36
|
Object.defineProperty(exports, "CreateFullPage", {
|
43
37
|
enumerable: true,
|
44
38
|
get: function get() {
|
@@ -294,8 +288,6 @@ var _Cascade = require("./Cascade");
|
|
294
288
|
|
295
289
|
var _ComboButton = require("./ComboButton");
|
296
290
|
|
297
|
-
var _ContextHeader = require("./ContextHeader");
|
298
|
-
|
299
291
|
var _CreateFullPage = require("./CreateFullPage");
|
300
292
|
|
301
293
|
var _CreateModal = require("./CreateModal");
|
@@ -16,7 +16,7 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
|
|
16
16
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
17
17
|
|
18
18
|
var defaults = {
|
19
|
-
prefix: '
|
19
|
+
prefix: 'c4p',
|
20
20
|
// by default only released components are set to true
|
21
21
|
component: {
|
22
22
|
// reviewed and released components:
|
@@ -56,7 +56,6 @@ var defaults = {
|
|
56
56
|
UnauthorizedEmptyState: true,
|
57
57
|
UserProfileImage: true,
|
58
58
|
// other public components not yet reviewed and released:
|
59
|
-
ContextHeader: false,
|
60
59
|
ExampleComponent: false,
|
61
60
|
LoadingBar: false,
|
62
61
|
ModifiedTabs: false,
|
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": "0.
|
4
|
+
"version": "1.0.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": "5b7378009e0e2bfcf264d7a0fdfe8293a9f4242e"
|
90
90
|
}
|
@@ -45,12 +45,29 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
45
45
|
background-color: var(--to-color);
|
46
46
|
}
|
47
47
|
}
|
48
|
+
@keyframes background-and-shadow-appear {
|
49
|
+
from {
|
50
|
+
background-color: var(--from-color);
|
51
|
+
box-shadow: 0 1px 0 var(--from-color);
|
52
|
+
}
|
53
|
+
to {
|
54
|
+
background-color: var(--to-color);
|
55
|
+
box-shadow: 0 1px 0 var(--to-color-shadow);
|
56
|
+
}
|
57
|
+
}
|
48
58
|
|
49
|
-
@mixin appearingBackground(
|
59
|
+
@mixin appearingBackground(
|
60
|
+
$with-shadow: false,
|
61
|
+
$from-color: $ui-background,
|
62
|
+
$to-color: $ui-01,
|
63
|
+
$to-color-shadow: $ui-03
|
64
|
+
) {
|
50
65
|
// stylelint-disable-next-line carbon/theme-token-use
|
51
66
|
--from-color: #{$from-color};
|
52
67
|
// stylelint-disable-next-line carbon/theme-token-use
|
53
68
|
--to-color: #{$to-color};
|
69
|
+
// stylelint-disable-next-line carbon/theme-token-use
|
70
|
+
--to-color-shadow: #{$to-color-shadow};
|
54
71
|
|
55
72
|
position: absolute;
|
56
73
|
top: 0;
|
@@ -61,8 +78,13 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
61
78
|
|
62
79
|
// This transitions the background-color between from-color and to-color
|
63
80
|
$duration: 1000ms;
|
64
|
-
|
65
|
-
animation: background-appear
|
81
|
+
|
82
|
+
$animation: background-appear;
|
83
|
+
@if ($with-shadow) {
|
84
|
+
$animation: background-and-shadow-appear;
|
85
|
+
}
|
86
|
+
|
87
|
+
animation: $animation $duration
|
66
88
|
calc((-1 * $duration * var(--#{$block-class}--background-opacity))) linear
|
67
89
|
paused forwards;
|
68
90
|
|
@@ -98,10 +120,9 @@ $right-section-alt-width: 100% - $left-section-alt-width;
|
|
98
120
|
}
|
99
121
|
|
100
122
|
&::before {
|
101
|
-
@include appearingBackground();
|
123
|
+
@include appearingBackground(true);
|
102
124
|
|
103
125
|
z-index: -1;
|
104
|
-
box-shadow: 0 1px 0 $ui-03;
|
105
126
|
}
|
106
127
|
|
107
128
|
.#{$block-class}--width--xl {
|
@@ -13,7 +13,7 @@
|
|
13
13
|
// TooltipIcon
|
14
14
|
@import 'carbon-components/scss/components/tooltip/tooltip';
|
15
15
|
|
16
|
-
$block-class: #{$pkg-prefix}
|
16
|
+
$block-class: #{$pkg-prefix}--user-profile-image;
|
17
17
|
|
18
18
|
$sizes: (
|
19
19
|
xlg: $spacing-10,
|
@@ -75,7 +75,7 @@ $theme-keys: map-keys($themes);
|
|
75
75
|
text-transform: uppercase;
|
76
76
|
}
|
77
77
|
|
78
|
-
.#{$prefix}--tooltip__trigger .#{$
|
78
|
+
.#{$prefix}--tooltip__trigger .#{$block-class} svg {
|
79
79
|
fill: $ui-01;
|
80
80
|
}
|
81
81
|
|
@@ -1,46 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Copyright IBM Corp. 2020, 2020
|
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
|
-
import React from 'react';
|
8
|
-
import PropTypes from 'prop-types';
|
9
|
-
import { pkg } from '../../settings';
|
10
|
-
var componentName = 'ContextHeader';
|
11
|
-
export var ContextHeader = function ContextHeader(_ref) {
|
12
|
-
var namespace = _ref.namespace,
|
13
|
-
name = _ref.name,
|
14
|
-
task = _ref.task;
|
15
|
-
return /*#__PURE__*/React.createElement("div", {
|
16
|
-
className: "".concat(pkg.prefix, "-context-header")
|
17
|
-
}, /*#__PURE__*/React.createElement("span", {
|
18
|
-
className: "".concat(pkg.prefix, "-context-header--task")
|
19
|
-
}, task), /*#__PURE__*/React.createElement("span", {
|
20
|
-
className: "".concat(pkg.prefix, "-context-header--name")
|
21
|
-
}, name), /*#__PURE__*/React.createElement("span", {
|
22
|
-
className: "".concat(pkg.prefix, "-context-header--separator")
|
23
|
-
}, "|"), /*#__PURE__*/React.createElement("span", {
|
24
|
-
className: "".concat(pkg.prefix, "-context-header--namespace")
|
25
|
-
}, namespace));
|
26
|
-
}; // Return a placeholder if not released and not enabled by feature flag
|
27
|
-
|
28
|
-
ContextHeader = pkg.checkComponentEnabled(ContextHeader, componentName);
|
29
|
-
ContextHeader.displayName = componentName;
|
30
|
-
ContextHeader.propTypes = {
|
31
|
-
/**
|
32
|
-
* The name of the current instance.
|
33
|
-
*/
|
34
|
-
name: PropTypes.string.isRequired,
|
35
|
-
|
36
|
-
/**
|
37
|
-
* The namespace in which the current instance is deployed.
|
38
|
-
*/
|
39
|
-
namespace: PropTypes.string.isRequired,
|
40
|
-
|
41
|
-
/**
|
42
|
-
* The high level task the user is using the embedding UI to carry out.
|
43
|
-
*/
|
44
|
-
task: PropTypes.string.isRequired
|
45
|
-
};
|
46
|
-
export default ContextHeader;
|
@@ -1,62 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
exports.default = exports.ContextHeader = void 0;
|
9
|
-
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
11
|
-
|
12
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
13
|
-
|
14
|
-
var _settings = require("../../settings");
|
15
|
-
|
16
|
-
//
|
17
|
-
// Copyright IBM Corp. 2020, 2020
|
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
|
-
var componentName = 'ContextHeader';
|
23
|
-
|
24
|
-
var ContextHeader = function ContextHeader(_ref) {
|
25
|
-
var namespace = _ref.namespace,
|
26
|
-
name = _ref.name,
|
27
|
-
task = _ref.task;
|
28
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
29
|
-
className: "".concat(_settings.pkg.prefix, "-context-header")
|
30
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
31
|
-
className: "".concat(_settings.pkg.prefix, "-context-header--task")
|
32
|
-
}, task), /*#__PURE__*/_react.default.createElement("span", {
|
33
|
-
className: "".concat(_settings.pkg.prefix, "-context-header--name")
|
34
|
-
}, name), /*#__PURE__*/_react.default.createElement("span", {
|
35
|
-
className: "".concat(_settings.pkg.prefix, "-context-header--separator")
|
36
|
-
}, "|"), /*#__PURE__*/_react.default.createElement("span", {
|
37
|
-
className: "".concat(_settings.pkg.prefix, "-context-header--namespace")
|
38
|
-
}, namespace));
|
39
|
-
}; // Return a placeholder if not released and not enabled by feature flag
|
40
|
-
|
41
|
-
|
42
|
-
exports.ContextHeader = ContextHeader;
|
43
|
-
exports.ContextHeader = ContextHeader = _settings.pkg.checkComponentEnabled(ContextHeader, componentName);
|
44
|
-
ContextHeader.displayName = componentName;
|
45
|
-
ContextHeader.propTypes = {
|
46
|
-
/**
|
47
|
-
* The name of the current instance.
|
48
|
-
*/
|
49
|
-
name: _propTypes.default.string.isRequired,
|
50
|
-
|
51
|
-
/**
|
52
|
-
* The namespace in which the current instance is deployed.
|
53
|
-
*/
|
54
|
-
namespace: _propTypes.default.string.isRequired,
|
55
|
-
|
56
|
-
/**
|
57
|
-
* The high level task the user is using the embedding UI to carry out.
|
58
|
-
*/
|
59
|
-
task: _propTypes.default.string.isRequired
|
60
|
-
};
|
61
|
-
var _default = ContextHeader;
|
62
|
-
exports.default = _default;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
4
|
-
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
6
|
-
value: true
|
7
|
-
});
|
8
|
-
Object.defineProperty(exports, "ContextHeader", {
|
9
|
-
enumerable: true,
|
10
|
-
get: function get() {
|
11
|
-
return _ContextHeader.default;
|
12
|
-
}
|
13
|
-
});
|
14
|
-
|
15
|
-
var _ContextHeader = _interopRequireDefault(require("./ContextHeader.js"));
|
@@ -1,43 +0,0 @@
|
|
1
|
-
//
|
2
|
-
// Copyright IBM Corp. 2020, 2020
|
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
|
-
// Standard imports.
|
9
|
-
@import '../../global/styles/project-settings';
|
10
|
-
|
11
|
-
.#{$pkg-prefix}-context-header {
|
12
|
-
display: flex;
|
13
|
-
width: 100%;
|
14
|
-
height: $spacing-07;
|
15
|
-
padding: 0 $spacing-05;
|
16
|
-
border-bottom: carbon--mini-units(0.125) solid $ui-03;
|
17
|
-
background: $ui-background;
|
18
|
-
}
|
19
|
-
|
20
|
-
.#{$pkg-prefix}-context-header--task,
|
21
|
-
.#{$pkg-prefix}-context-header--name,
|
22
|
-
.#{$pkg-prefix}-context-header--namespace,
|
23
|
-
.#{$pkg-prefix}-context-header--separator {
|
24
|
-
@include carbon--type-style('label-01');
|
25
|
-
|
26
|
-
display: inline-flex;
|
27
|
-
align-items: center;
|
28
|
-
}
|
29
|
-
|
30
|
-
.#{$pkg-prefix}-context-header--task {
|
31
|
-
padding-right: $spacing-05;
|
32
|
-
color: $text-01;
|
33
|
-
}
|
34
|
-
|
35
|
-
.#{$pkg-prefix}-context-header--name,
|
36
|
-
.#{$pkg-prefix}-context-header--namespace,
|
37
|
-
.#{$pkg-prefix}-context-header--separator {
|
38
|
-
color: $text-02;
|
39
|
-
}
|
40
|
-
|
41
|
-
.#{$pkg-prefix}-context-header--separator {
|
42
|
-
padding: 0 $spacing-03;
|
43
|
-
}
|