@carbon/ibm-products 1.64.0 → 1.66.0
Sign up to get free protection for your applications and to get access to all the features.
- package/css/index-full-carbon.css +232 -10
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +2 -2
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +8 -10
- 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-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +232 -10
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +2 -2
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +232 -10
- package/css/index.css.map +1 -1
- package/css/index.min.css +2 -2
- package/css/index.min.css.map +1 -1
- package/es/components/Carousel/Carousel.js +5 -3
- package/es/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +6 -2
- package/es/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +60 -41
- package/es/components/InterstitialScreen/InterstitialScreen.js +419 -0
- package/es/components/InterstitialScreen/assets/index.js +5 -0
- package/es/components/InterstitialScreen/index.js +8 -0
- package/es/components/InterstitialScreenView/InterstitialScreenView.js +75 -0
- package/es/components/InterstitialScreenView/index.js +8 -0
- package/es/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +83 -0
- package/es/components/InterstitialScreenViewModule/index.js +8 -0
- package/es/components/index.js +3 -0
- package/es/global/js/package-settings.js +4 -0
- package/lib/components/Carousel/Carousel.js +5 -3
- package/lib/components/Datagrid/Datagrid/addons/Filtering/FilterPanel.js +5 -1
- package/lib/components/Datagrid/Datagrid/addons/Filtering/motion/variants.js +60 -41
- package/lib/components/InterstitialScreen/InterstitialScreen.js +420 -0
- package/lib/components/InterstitialScreen/assets/index.js +14 -0
- package/lib/components/InterstitialScreen/index.js +12 -0
- package/lib/components/InterstitialScreenView/InterstitialScreenView.js +72 -0
- package/lib/components/InterstitialScreenView/index.js +12 -0
- package/lib/components/InterstitialScreenViewModule/InterstitialScreenViewModule.js +80 -0
- package/lib/components/InterstitialScreenViewModule/index.js +12 -0
- package/lib/components/index.js +21 -0
- package/lib/global/js/package-settings.js +4 -0
- package/package.json +2 -2
- package/scss/components/InterstitialScreen/_index.scss +8 -0
- package/scss/components/InterstitialScreen/_interstitial-screen.scss +266 -0
- package/scss/components/InterstitialScreen/_storybook-styles.scss +59 -0
- package/scss/components/InterstitialScreenView/_index.scss +8 -0
- package/scss/components/InterstitialScreenView/_interstitial-screen-view.scss +25 -0
- package/scss/components/InterstitialScreenView/_storybook-styles.scss +10 -0
- package/scss/components/InterstitialScreenViewModule/_index.scss +8 -0
- package/scss/components/InterstitialScreenViewModule/_interstitial-screen-view-module.scss +54 -0
- package/scss/components/InterstitialScreenViewModule/_storybook-styles.scss +10 -0
- package/scss/components/SidePanel/_side-panel.scss +4 -2
- package/scss/components/_index.scss +3 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
|
3
|
+
var _excluded = ["className", "title", "description"];
|
4
|
+
/**
|
5
|
+
* Copyright IBM Corp. 2023, 2023
|
6
|
+
*
|
7
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
9
|
+
*/
|
10
|
+
|
11
|
+
// Import portions of React that are needed.
|
12
|
+
import React from 'react';
|
13
|
+
|
14
|
+
// Other standard imports.
|
15
|
+
import PropTypes from 'prop-types';
|
16
|
+
import cx from 'classnames';
|
17
|
+
import { getDevtoolsProps } from '../../global/js/utils/devtools';
|
18
|
+
import { pkg /*, carbon */ } from '../../settings';
|
19
|
+
|
20
|
+
// Carbon and package components we use.
|
21
|
+
/* TODO: @import(s) of carbon components and other package components. */
|
22
|
+
|
23
|
+
// The block part of our conventional BEM class names (blockClass__E--M).
|
24
|
+
var blockClass = "".concat(pkg.prefix, "--interstitial-screen-view-module");
|
25
|
+
var componentName = 'InterstitialScreenViewModule';
|
26
|
+
|
27
|
+
// NOTE: the component SCSS is not imported here: it is rolled up separately.
|
28
|
+
|
29
|
+
// Default values can be included here and then assigned to the prop params,
|
30
|
+
// e.g. prop = defaults.prop,
|
31
|
+
// This gathers default values together neatly and ensures non-primitive
|
32
|
+
// values are initialized early to avoid react making unnecessary re-renders.
|
33
|
+
// Note that default values are not required for props that are 'required',
|
34
|
+
// nor for props where the component can apply undefined values reasonably.
|
35
|
+
// Default values should be provided when the component needs to make a choice
|
36
|
+
// or assumption when a prop is not supplied.
|
37
|
+
|
38
|
+
/**
|
39
|
+
* View module to help in building interstitial screen views.
|
40
|
+
*/
|
41
|
+
export var InterstitialScreenViewModule = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
42
|
+
var className = _ref.className,
|
43
|
+
title = _ref.title,
|
44
|
+
description = _ref.description,
|
45
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
46
|
+
return /*#__PURE__*/React.createElement("section", _extends({}, rest, {
|
47
|
+
className: cx(blockClass,
|
48
|
+
// Apply the block class to the main HTML element
|
49
|
+
className // Apply any supplied class names to the main HTML element.
|
50
|
+
),
|
51
|
+
|
52
|
+
ref: ref
|
53
|
+
}, getDevtoolsProps(componentName)), /*#__PURE__*/React.createElement("h1", {
|
54
|
+
className: "".concat(blockClass, "--heading")
|
55
|
+
}, title), /*#__PURE__*/React.createElement("p", {
|
56
|
+
className: "".concat(blockClass, "--body")
|
57
|
+
}, description));
|
58
|
+
});
|
59
|
+
|
60
|
+
// Return a placeholder if not released and not enabled by feature flag
|
61
|
+
InterstitialScreenViewModule = pkg.checkComponentEnabled(InterstitialScreenViewModule, componentName);
|
62
|
+
|
63
|
+
// The display name of the component, used by React. Note that displayName
|
64
|
+
// is used in preference to relying on function.name.
|
65
|
+
InterstitialScreenViewModule.displayName = componentName;
|
66
|
+
|
67
|
+
// The types and DocGen commentary for the component props,
|
68
|
+
// in alphabetical order (for consistency).
|
69
|
+
// See https://www.npmjs.com/package/prop-types#usage.
|
70
|
+
InterstitialScreenViewModule.propTypes = {
|
71
|
+
/**
|
72
|
+
* Provide an optional class to be applied to the containing node.
|
73
|
+
*/
|
74
|
+
className: PropTypes.string,
|
75
|
+
/**
|
76
|
+
* The description of this component.
|
77
|
+
*/
|
78
|
+
description: PropTypes.string.isRequired,
|
79
|
+
/**
|
80
|
+
* The title of this component.
|
81
|
+
*/
|
82
|
+
title: PropTypes.string.isRequired
|
83
|
+
};
|
package/es/components/index.js
CHANGED
@@ -54,4 +54,7 @@ export { CoachmarkOverlayElements } from './CoachmarkOverlayElements';
|
|
54
54
|
export { CoachmarkOverlayElement } from './CoachmarkOverlayElement';
|
55
55
|
export { CoachmarkStack } from './CoachmarkStack';
|
56
56
|
export { InlineTip, InlineTipButton, InlineTipLink } from './InlineTip';
|
57
|
+
export { InterstitialScreen } from './InterstitialScreen';
|
58
|
+
export { InterstitialScreenView } from './InterstitialScreenView';
|
59
|
+
export { InterstitialScreenViewModule } from './InterstitialScreenViewModule';
|
57
60
|
export { Checklist } from './Checklist';
|
@@ -80,6 +80,9 @@ var defaults = {
|
|
80
80
|
GuidebannerElementButton: false,
|
81
81
|
GuidebannerElementLink: false,
|
82
82
|
NonLinearReading: false,
|
83
|
+
InterstitialScreen: false,
|
84
|
+
InterstitialScreenView: false,
|
85
|
+
InterstitialScreenViewModule: false,
|
83
86
|
Checklist: false,
|
84
87
|
Coachmark: false,
|
85
88
|
CoachmarkBeacon: false,
|
@@ -88,6 +91,7 @@ var defaults = {
|
|
88
91
|
CoachmarkOverlayElement: false,
|
89
92
|
CoachmarkOverlayElements: false,
|
90
93
|
CoachmarkStack: false
|
94
|
+
|
91
95
|
/* new component flags here - comment used by generate CLI */
|
92
96
|
},
|
93
97
|
|
@@ -197,9 +197,11 @@ var Carousel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
|
|
197
197
|
(0, _react.useEffect)(function () {
|
198
198
|
function handleWheel(event) {
|
199
199
|
// update the scroll position
|
200
|
-
event.
|
201
|
-
|
202
|
-
|
200
|
+
if (event.shiftKey) {
|
201
|
+
event.stopPropagation();
|
202
|
+
event.preventDefault();
|
203
|
+
event.cancelBubble = false;
|
204
|
+
}
|
203
205
|
}
|
204
206
|
var scrollDiv = scrollRef.current;
|
205
207
|
if (scrollDiv) {
|
@@ -25,7 +25,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
25
25
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
26
26
|
/* eslint-disable react/jsx-key */
|
27
27
|
/**
|
28
|
-
* Copyright IBM Corp. 2022,
|
28
|
+
* Copyright IBM Corp. 2022, 2024
|
29
29
|
*
|
30
30
|
* This source code is licensed under the Apache-2.0 license found in the
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
@@ -112,6 +112,7 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
112
112
|
_useShouldDisableButt2 = (0, _slicedToArray2.default)(_useShouldDisableButt, 2),
|
113
113
|
shouldDisableButtons = _useShouldDisableButt2[0],
|
114
114
|
setShouldDisableButtons = _useShouldDisableButt2[1];
|
115
|
+
var shouldReduceMotion = (0, _framerMotion.useReducedMotion)();
|
115
116
|
|
116
117
|
/** Memos */
|
117
118
|
var showActionSet = (0, _react.useMemo)(function () {
|
@@ -156,6 +157,7 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
156
157
|
}],
|
157
158
|
className: "".concat(componentClass, "__action-set"),
|
158
159
|
ref: actionSetRef,
|
160
|
+
custom: shouldReduceMotion,
|
159
161
|
variants: _variants.actionSetVariants
|
160
162
|
});
|
161
163
|
};
|
@@ -193,8 +195,10 @@ var FilterPanel = function FilterPanel(_ref) {
|
|
193
195
|
className: (0, _classnames.default)(componentClass, "".concat(componentClass, "__container"), (_cx = {}, (0, _defineProperty2.default)(_cx, "".concat(componentClass, "--open"), panelOpen), (0, _defineProperty2.default)(_cx, "".concat(componentClass, "--batch"), showActionSet), (0, _defineProperty2.default)(_cx, "".concat(componentClass, "--instant"), !showActionSet), _cx)),
|
194
196
|
initial: false,
|
195
197
|
animate: panelOpen ? 'visible' : 'hidden',
|
198
|
+
custom: shouldReduceMotion,
|
196
199
|
variants: _variants.panelVariants
|
197
200
|
}, /*#__PURE__*/_react.default.createElement(_framerMotion.motion.div, {
|
201
|
+
custom: shouldReduceMotion,
|
198
202
|
variants: _variants.innerContainerVariants
|
199
203
|
}, /*#__PURE__*/_react.default.createElement("header", {
|
200
204
|
ref: filterHeadingRef,
|
@@ -6,59 +6,78 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.panelVariants = exports.innerContainerVariants = exports.actionSetVariants = void 0;
|
7
7
|
var _motionConstants = require("../../../../../../global/js/utils/motionConstants");
|
8
8
|
var _constants = require("../constants");
|
9
|
+
/**
|
10
|
+
* Copyright IBM Corp. 2023, 2024
|
11
|
+
*
|
12
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
14
|
+
*/
|
15
|
+
|
9
16
|
var panelVariants = {
|
10
|
-
hidden: {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
17
|
+
hidden: function hidden(shouldReduceMotion) {
|
18
|
+
return {
|
19
|
+
width: 0,
|
20
|
+
overflow: 'hidden',
|
21
|
+
transition: {
|
22
|
+
duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.fast02,
|
23
|
+
ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.exit,
|
24
|
+
when: 'afterChildren'
|
25
|
+
}
|
26
|
+
};
|
18
27
|
},
|
19
|
-
visible: {
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
28
|
+
visible: function visible(shouldReduceMotion) {
|
29
|
+
return {
|
30
|
+
width: _constants.PANEL_WIDTH,
|
31
|
+
overflow: 'visible',
|
32
|
+
transition: {
|
33
|
+
duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.moderate02,
|
34
|
+
ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.entrance,
|
35
|
+
when: 'beforeChildren'
|
36
|
+
}
|
37
|
+
};
|
27
38
|
}
|
28
39
|
};
|
29
40
|
exports.panelVariants = panelVariants;
|
30
41
|
var innerContainerVariants = {
|
31
|
-
hidden: {
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
42
|
+
hidden: function hidden(shouldReduceMotion) {
|
43
|
+
return {
|
44
|
+
opacity: 0,
|
45
|
+
transition: {
|
46
|
+
duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.fast01,
|
47
|
+
ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.exit
|
48
|
+
}
|
49
|
+
};
|
37
50
|
},
|
38
|
-
visible: {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
51
|
+
visible: function visible(shouldReduceMotion) {
|
52
|
+
return {
|
53
|
+
opacity: 1,
|
54
|
+
transition: {
|
55
|
+
duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.fast02,
|
56
|
+
ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.entrance,
|
57
|
+
when: 'beforeChildren'
|
58
|
+
}
|
59
|
+
};
|
45
60
|
}
|
46
61
|
};
|
47
62
|
exports.innerContainerVariants = innerContainerVariants;
|
48
63
|
var actionSetVariants = {
|
49
|
-
hidden: {
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
64
|
+
hidden: function hidden(shouldReduceMotion) {
|
65
|
+
return {
|
66
|
+
y: _constants.ACTION_SET_HEIGHT,
|
67
|
+
transition: {
|
68
|
+
duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.fast01,
|
69
|
+
ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.exit
|
70
|
+
}
|
71
|
+
};
|
55
72
|
},
|
56
|
-
visible: {
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
73
|
+
visible: function visible(shouldReduceMotion) {
|
74
|
+
return {
|
75
|
+
y: 0,
|
76
|
+
transition: {
|
77
|
+
duration: shouldReduceMotion ? 0 : _motionConstants.DURATIONS.fast02,
|
78
|
+
ease: shouldReduceMotion ? 0 : _motionConstants.EASINGS.productive.entrance
|
79
|
+
}
|
80
|
+
};
|
62
81
|
}
|
63
82
|
};
|
64
83
|
exports.actionSetVariants = actionSetVariants;
|