@carbon/ibm-products 2.36.0-alpha.27 → 2.37.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/css/index-full-carbon.css +5404 -5117
  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 +4 -4
  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 +820 -61
  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 +329 -6
  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/_virtual/_rollupPluginBabelHelpers.js +9 -10
  18. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +3 -1
  19. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +8 -2
  20. package/es/components/Carousel/Carousel.d.ts +46 -2
  21. package/es/components/Carousel/Carousel.js +36 -21
  22. package/es/components/Carousel/CarouselItem.d.ts +19 -2
  23. package/es/components/Carousel/CarouselItem.js +0 -1
  24. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +21 -0
  25. package/es/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +261 -0
  26. package/es/components/ConditionBuilder/ConditionBuilder.js +45 -16
  27. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +12 -0
  28. package/es/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +40 -0
  29. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +22 -0
  30. package/es/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +74 -0
  31. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +18 -1
  32. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +90 -42
  33. package/es/components/ConditionBuilder/ConditionBuilderContext/{DataTreeContext.d.ts → ConditionBuilderProvider.d.ts} +5 -2
  34. package/es/components/ConditionBuilder/ConditionBuilderContext/{DataTreeContext.js → ConditionBuilderProvider.js} +27 -8
  35. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +22 -0
  36. package/es/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +112 -0
  37. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +31 -0
  38. package/es/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +40 -0
  39. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +28 -0
  40. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +151 -0
  41. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +11 -0
  42. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +59 -0
  43. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.d.ts +13 -0
  44. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +52 -0
  45. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.d.ts +13 -0
  46. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +162 -0
  47. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +11 -0
  48. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +40 -0
  49. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts +11 -0
  50. package/es/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +82 -0
  51. package/es/components/ConditionBuilder/ConditionConnector/ConditionConnector.d.ts +15 -0
  52. package/es/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +85 -0
  53. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +24 -0
  54. package/es/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +145 -0
  55. package/es/components/ConditionBuilder/utils/util.d.ts +4 -0
  56. package/es/components/ConditionBuilder/utils/util.js +16 -0
  57. package/es/components/CreateTearsheet/CreateTearsheet.d.ts +106 -4
  58. package/es/components/CreateTearsheet/CreateTearsheet.js +12 -32
  59. package/es/components/Datagrid/useParentDimensions.js +1 -1
  60. package/es/components/EditUpdateCards/EditUpdateCards.d.ts +104 -2
  61. package/es/components/EditUpdateCards/EditUpdateCards.js +3 -0
  62. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +61 -2
  63. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -3
  64. package/es/components/ExpressiveCard/ExpressiveCard.d.ts +97 -2
  65. package/es/components/ExpressiveCard/ExpressiveCard.js +4 -0
  66. package/es/components/InlineTip/InlineTipButton.d.ts +21 -2
  67. package/es/components/InterstitialScreen/InterstitialScreen.d.ts +100 -2
  68. package/es/components/InterstitialScreen/InterstitialScreen.js +25 -14
  69. package/es/components/Nav/NavItem.js +1 -1
  70. package/es/components/NotificationsPanel/NotificationsPanel.js +5 -6
  71. package/es/components/PageHeader/PageHeader.js +12 -3
  72. package/es/components/SidePanel/SidePanel.js +1 -1
  73. package/es/components/SimpleHeader/SimpleHeader.d.ts +1 -5
  74. package/es/components/SimpleHeader/SimpleHeader.js +2 -4
  75. package/es/components/Tearsheet/TearsheetNarrow.d.ts +4 -13
  76. package/es/components/Tearsheet/TearsheetShell.d.ts +119 -10
  77. package/es/components/Tearsheet/TearsheetShell.js +18 -8
  78. package/es/components/UserProfileImage/UserProfileImage.d.ts +66 -2
  79. package/es/components/UserProfileImage/UserProfileImage.js +5 -3
  80. package/es/components/WebTerminal/WebTerminal.d.ts +46 -2
  81. package/es/components/WebTerminal/WebTerminal.js +2 -2
  82. package/es/global/js/hooks/usePrefersReducedMotion.d.ts +2 -0
  83. package/es/global/js/hooks/usePrefersReducedMotion.js +28 -0
  84. package/es/global/js/utils/Wrap.d.ts +31 -2
  85. package/es/global/js/utils/Wrap.js +7 -9
  86. package/es/global/js/utils/getNodeTextContent.d.ts +1 -1
  87. package/es/global/js/utils/getNodeTextContent.js +1 -1
  88. package/es/global/js/utils/window.d.ts +2 -0
  89. package/es/global/js/utils/window.js +12 -0
  90. package/es/node_modules/@carbon/icons-react/es/generated/bucket-9.js +2780 -0
  91. package/lib/_virtual/_rollupPluginBabelHelpers.js +9 -10
  92. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.d.ts +3 -1
  93. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +8 -2
  94. package/lib/components/Carousel/Carousel.d.ts +46 -2
  95. package/lib/components/Carousel/Carousel.js +35 -20
  96. package/lib/components/Carousel/CarouselItem.d.ts +19 -2
  97. package/lib/components/Carousel/CarouselItem.js +0 -1
  98. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.d.ts +21 -0
  99. package/lib/components/ConditionBuilder/ConditionBlock/ConditionBlock.js +270 -0
  100. package/lib/components/ConditionBuilder/ConditionBuilder.js +46 -17
  101. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.d.ts +12 -0
  102. package/lib/components/ConditionBuilder/ConditionBuilderAdd/ConditionBuilderAdd.js +48 -0
  103. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.d.ts +22 -0
  104. package/lib/components/ConditionBuilder/ConditionBuilderButton/ConditionBuilderButton.js +83 -0
  105. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +18 -1
  106. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +90 -42
  107. package/lib/components/ConditionBuilder/ConditionBuilderContext/{DataTreeContext.d.ts → ConditionBuilderProvider.d.ts} +5 -2
  108. package/lib/components/ConditionBuilder/ConditionBuilderContext/{DataTreeContext.js → ConditionBuilderProvider.js} +27 -8
  109. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.d.ts +22 -0
  110. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataConfigs.js +121 -0
  111. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.d.ts +31 -0
  112. package/lib/components/ConditionBuilder/ConditionBuilderContext/translationObject.js +44 -0
  113. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.d.ts +28 -0
  114. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItem.js +159 -0
  115. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.d.ts +11 -0
  116. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemDate/ConditionBuilderItemDate.js +67 -0
  117. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.d.ts +13 -0
  118. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemNumber/ConditionBuilderItemNumber.js +60 -0
  119. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.d.ts +13 -0
  120. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemOption/ConditionBuilderItemOption.js +170 -0
  121. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.d.ts +11 -0
  122. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemText/ConditionBuilderItemText.js +48 -0
  123. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.d.ts +11 -0
  124. package/lib/components/ConditionBuilder/ConditionBuilderItem/ConditionBuilderItemTime/ConditionBuilderItemTime.js +90 -0
  125. package/lib/components/ConditionBuilder/ConditionConnector/ConditionConnector.d.ts +15 -0
  126. package/lib/components/ConditionBuilder/ConditionConnector/ConditionConnector.js +93 -0
  127. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.d.ts +24 -0
  128. package/lib/components/ConditionBuilder/ConditionGroupBuilder/ConditionGroupBuilder.js +153 -0
  129. package/lib/components/ConditionBuilder/utils/util.d.ts +4 -0
  130. package/lib/components/ConditionBuilder/utils/util.js +20 -0
  131. package/lib/components/CreateTearsheet/CreateTearsheet.d.ts +106 -4
  132. package/lib/components/CreateTearsheet/CreateTearsheet.js +12 -32
  133. package/lib/components/Datagrid/useParentDimensions.js +1 -1
  134. package/lib/components/EditUpdateCards/EditUpdateCards.d.ts +104 -2
  135. package/lib/components/EditUpdateCards/EditUpdateCards.js +3 -0
  136. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.d.ts +61 -2
  137. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +1 -3
  138. package/lib/components/ExpressiveCard/ExpressiveCard.d.ts +97 -2
  139. package/lib/components/ExpressiveCard/ExpressiveCard.js +4 -0
  140. package/lib/components/InlineTip/InlineTipButton.d.ts +21 -2
  141. package/lib/components/InterstitialScreen/InterstitialScreen.d.ts +100 -2
  142. package/lib/components/InterstitialScreen/InterstitialScreen.js +24 -13
  143. package/lib/components/Nav/NavItem.js +2 -2
  144. package/lib/components/NotificationsPanel/NotificationsPanel.js +5 -6
  145. package/lib/components/PageHeader/PageHeader.js +11 -2
  146. package/lib/components/SidePanel/SidePanel.js +1 -1
  147. package/lib/components/SimpleHeader/SimpleHeader.d.ts +1 -5
  148. package/lib/components/SimpleHeader/SimpleHeader.js +2 -4
  149. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +4 -13
  150. package/lib/components/Tearsheet/TearsheetShell.d.ts +119 -10
  151. package/lib/components/Tearsheet/TearsheetShell.js +16 -6
  152. package/lib/components/UserProfileImage/UserProfileImage.d.ts +66 -2
  153. package/lib/components/UserProfileImage/UserProfileImage.js +5 -3
  154. package/lib/components/WebTerminal/WebTerminal.d.ts +46 -2
  155. package/lib/components/WebTerminal/WebTerminal.js +2 -2
  156. package/lib/global/js/hooks/usePrefersReducedMotion.d.ts +2 -0
  157. package/lib/global/js/hooks/usePrefersReducedMotion.js +32 -0
  158. package/lib/global/js/utils/Wrap.d.ts +31 -2
  159. package/lib/global/js/utils/Wrap.js +7 -9
  160. package/lib/global/js/utils/getNodeTextContent.d.ts +1 -1
  161. package/lib/global/js/utils/getNodeTextContent.js +1 -1
  162. package/lib/global/js/utils/window.d.ts +2 -0
  163. package/lib/global/js/utils/window.js +16 -0
  164. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-9.js +2912 -0
  165. package/package.json +5 -5
  166. package/scss/components/CoachmarkOverlayElements/_coachmark-overlay-elements.scss +1 -1
  167. package/scss/components/ConditionBuilder/_condition-builder.scss +26 -0
  168. package/scss/components/ConditionBuilder/styles/_conditionBuilderCondition.scss +46 -0
  169. package/scss/components/ConditionBuilder/styles/_conditionBuilderItem.scss +194 -0
  170. package/scss/components/ConditionBuilder/styles/_index.scss +2 -0
  171. package/scss/components/Guidebanner/_guidebanner.scss +3 -0
  172. package/scss/components/InterstitialScreen/_interstitial-screen.scss +1 -6
  173. package/scss/components/Tearsheet/_tearsheet.scss +3 -1
  174. package/telemetry.yml +3 -0
  175. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +0 -58
  176. package/es/global/js/utils/keyboardNavigation.d.ts +0 -27
  177. package/es/global/js/utils/keyboardNavigation.js +0 -33
  178. package/es/global/js/utils/wrapFocus.d.ts +0 -25
  179. package/es/global/js/utils/wrapFocus.js +0 -68
  180. package/es/node_modules/@carbon/icons-react/es/generated/bucket-8.js +0 -3004
  181. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +0 -58
  182. package/lib/global/js/utils/keyboardNavigation.d.ts +0 -27
  183. package/lib/global/js/utils/keyboardNavigation.js +0 -39
  184. package/lib/global/js/utils/wrapFocus.d.ts +0 -25
  185. package/lib/global/js/utils/wrapFocus.js +0 -73
  186. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-8.js +0 -3136
@@ -1,4 +1,106 @@
1
- export const StepsContext: React.Context<null>;
2
- export const StepNumberContext: React.Context<number>;
3
- export let CreateTearsheet: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
4
- import React from 'react';
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2022
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, { ReactNode, PropsWithChildren, Dispatch, SetStateAction } from 'react';
8
+ export interface StepsContextType {
9
+ currentStep: number;
10
+ setIsDisabled: Dispatch<SetStateAction<boolean>>;
11
+ setOnPrevious: (fn: any) => void;
12
+ setOnNext: (fn: any) => void;
13
+ setOnMount: (fn: any) => void;
14
+ setStepData: Dispatch<SetStateAction<Step[]>>;
15
+ stepData: Step[];
16
+ }
17
+ export declare const StepsContext: React.Context<StepsContextType | null>;
18
+ export declare const StepNumberContext: React.Context<number>;
19
+ interface CreateTearsheetProps extends PropsWithChildren {
20
+ /**
21
+ * The back button text
22
+ */
23
+ backButtonText: string;
24
+ /**
25
+ * The cancel button text
26
+ */
27
+ cancelButtonText: string;
28
+ /**
29
+ * The main content of the tearsheet
30
+ */
31
+ /**
32
+ * An optional class or classes to be added to the outermost element.
33
+ */
34
+ className?: string;
35
+ /**
36
+ * A description of the flow, displayed in the header area of the tearsheet.
37
+ */
38
+ description?: ReactNode;
39
+ /**
40
+ * Specifies elements to focus on first on render.
41
+ */
42
+ firstFocusElement?: string;
43
+ /**
44
+ * Used to set the size of the influencer
45
+ */
46
+ influencerWidth?: 'narrow' | 'wide';
47
+ /**
48
+ * This can be used to open the component to a step other than the first step.
49
+ * For example, a create flow was previously in progress, data was saved, and
50
+ * is now being completed.
51
+ */
52
+ initialStep?: number;
53
+ /**
54
+ * A label for the tearsheet, displayed in the header area of the tearsheet
55
+ * to maintain context for the tearsheet (e.g. as the title changes from page
56
+ * to page of a multi-page task).
57
+ */
58
+ label?: ReactNode;
59
+ /**
60
+ * The next button text
61
+ */
62
+ nextButtonText: string;
63
+ /**
64
+ * An optional handler that is called when the user closes the tearsheet (by
65
+ * clicking the close button, if enabled, or clicking outside, if enabled).
66
+ * Returning `false` here prevents the modal from closing.
67
+ */
68
+ onClose?: () => void;
69
+ /**
70
+ * Specify a handler for submitting the multi step tearsheet (final step).
71
+ * This function can _optionally_ return a promise that is either resolved or rejected and the CreateTearsheet will handle the submitting state of the create button.
72
+ */
73
+ onRequestSubmit: () => void;
74
+ /**
75
+ * Specifies whether the tearsheet is currently open.
76
+ */
77
+ open?: boolean;
78
+ /**
79
+ * **Experimental:** Provide a `Slug` component to be rendered inside the `Tearsheet` component
80
+ */
81
+ slug?: ReactNode;
82
+ /**
83
+ * The submit button text
84
+ */
85
+ submitButtonText: string;
86
+ /**
87
+ * The main title of the tearsheet, displayed in the header area.
88
+ */
89
+ title?: ReactNode;
90
+ /**
91
+ * The position of the top of tearsheet in the viewport. The 'normal'
92
+ * position (the default) is a short distance down from the top of the
93
+ * viewport, leaving room at the top for a global header bar to show through
94
+ * from below. The 'lower' position provides a little extra room at the top
95
+ * to allow an action bar navigation or breadcrumbs to also show through.
96
+ */
97
+ verticalPosition?: 'normal' | 'lower';
98
+ }
99
+ interface Step {
100
+ introStep?: boolean;
101
+ secondaryLabel?: string;
102
+ shouldIncludeStep?: boolean;
103
+ title?: string;
104
+ }
105
+ export declare let CreateTearsheet: React.ForwardRefExoticComponent<CreateTearsheetProps & React.RefAttributes<HTMLDivElement>>;
106
+ export {};
@@ -14,7 +14,6 @@ var React = require('react');
14
14
  var index = require('../../node_modules/prop-types/index.js');
15
15
  var cx = require('classnames');
16
16
  var react = require('@carbon/react');
17
- var wrapFocus = require('../../global/js/utils/wrapFocus.js');
18
17
  var TearsheetShell = require('../Tearsheet/TearsheetShell.js');
19
18
  var settings = require('../../settings.js');
20
19
  var devtools = require('../../global/js/utils/devtools.js');
@@ -39,17 +38,12 @@ var blockClass = "".concat(settings.pkg.prefix, "--tearsheet-create");
39
38
  // This is a general context for the steps container
40
39
  // containing information about the state of the container
41
40
  // and providing some callback methods for steps to use
41
+
42
42
  var StepsContext = /*#__PURE__*/React.createContext(null);
43
43
 
44
44
  // This is a context supplied separately to each step in the container
45
45
  // to let it know what number it is in the sequence of steps
46
46
  var StepNumberContext = /*#__PURE__*/React.createContext(-1);
47
-
48
- // Default values for props
49
- var defaults = {
50
- verticalPosition: 'normal',
51
- influencerWidth: 'narrow'
52
- };
53
47
  exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
54
48
  var backButtonText = _ref.backButtonText,
55
49
  cancelButtonText = _ref.cancelButtonText,
@@ -57,7 +51,7 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
57
51
  className = _ref.className,
58
52
  description = _ref.description,
59
53
  _ref$influencerWidth = _ref.influencerWidth,
60
- influencerWidth = _ref$influencerWidth === void 0 ? defaults.influencerWidth : _ref$influencerWidth,
54
+ influencerWidth = _ref$influencerWidth === void 0 ? 'narrow' : _ref$influencerWidth,
61
55
  initialStep = _ref.initialStep,
62
56
  label = _ref.label,
63
57
  nextButtonText = _ref.nextButtonText,
@@ -69,7 +63,7 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
69
63
  submitButtonText = _ref.submitButtonText,
70
64
  title = _ref.title,
71
65
  _ref$verticalPosition = _ref.verticalPosition,
72
- verticalPosition = _ref$verticalPosition === void 0 ? defaults.verticalPosition : _ref$verticalPosition,
66
+ verticalPosition = _ref$verticalPosition === void 0 ? 'normal' : _ref$verticalPosition,
73
67
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
74
68
  var _useState = React.useState([]),
75
69
  _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
@@ -115,7 +109,7 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
115
109
  _useState22 = _rollupPluginBabelHelpers.slicedToArray(_useState21, 2),
116
110
  firstIncludedStep = _useState22[0],
117
111
  setFirstIncludedStep = _useState22[1];
118
- var _useState23 = React.useState(null),
112
+ var _useState23 = React.useState(),
119
113
  _useState24 = _rollupPluginBabelHelpers.slicedToArray(_useState23, 2),
120
114
  lastIncludedStep = _useState24[0],
121
115
  setLastIncludedStep = _useState24[1];
@@ -123,7 +117,7 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
123
117
  currentStep: currentStep,
124
118
  open: open
125
119
  });
126
- var contentRef = React.useRef();
120
+ var contentRef = React.useRef(null);
127
121
  React.useEffect(function () {
128
122
  var firstItem = stepData.findIndex(function (item) {
129
123
  return item === null || item === void 0 ? void 0 : item.shouldIncludeStep;
@@ -153,9 +147,11 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
153
147
  useResetCreateComponent.useResetCreateComponent({
154
148
  firstIncludedStep: firstIncludedStep,
155
149
  previousState: previousState,
150
+ /**@ts-ignore */
156
151
  open: open,
157
152
  setCurrentStep: setCurrentStep,
158
153
  stepData: stepData,
154
+ /**@ts-ignore */
159
155
  initialStep: initialStep,
160
156
  totalSteps: stepData === null || stepData === void 0 ? void 0 : stepData.length,
161
157
  componentName: componentName
@@ -170,6 +166,7 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
170
166
  setCurrentStep: setCurrentStep,
171
167
  setIsSubmitting: setIsSubmitting,
172
168
  setShouldViewAll: setShouldViewAll,
169
+ /**@ts-ignore */
173
170
  setLoadingPrevious: setLoadingPrevious,
174
171
  loadingPrevious: loadingPrevious,
175
172
  onClose: onClose,
@@ -185,43 +182,26 @@ exports.CreateTearsheet = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
185
182
  componentBlockClass: blockClass,
186
183
  setCreateComponentActions: setCreateTearsheetActions
187
184
  });
188
-
189
- // adds focus trap functionality
190
- /* istanbul ignore next */
191
- var handleBlur = function handleBlur(_ref2) {
192
- var oldActiveNode = _ref2.target,
193
- currentActiveNode = _ref2.relatedTarget;
194
- var visibleStepInnerContent = document.querySelector(".".concat(settings.pkg.prefix, "--tearsheet__body"));
195
- if (open && visibleStepInnerContent) {
196
- wrapFocus["default"]({
197
- bodyNode: visibleStepInnerContent,
198
- currentActiveNode: currentActiveNode,
199
- oldActiveNode: oldActiveNode
200
- });
201
- }
202
- };
203
- return /*#__PURE__*/React__default["default"].createElement(TearsheetShell.TearsheetShell, _rollupPluginBabelHelpers["extends"]({}, rest, devtools.getDevtoolsProps(componentName), {
185
+ return /*#__PURE__*/React__default["default"].createElement(TearsheetShell.TearsheetShell, _rollupPluginBabelHelpers["extends"]({}, devtools.getDevtoolsProps(componentName), rest, {
186
+ ref: ref,
204
187
  actions: createTearsheetActions,
205
188
  className: cx__default["default"](blockClass, className),
206
189
  description: description,
207
- hasCloseIcon: false,
208
190
  influencer: /*#__PURE__*/React__default["default"].createElement(CreateInfluencer.CreateInfluencer, {
209
191
  currentStep: currentStep,
210
192
  stepData: stepData
211
193
  }),
212
- influencerPosition: "left",
213
194
  influencerWidth: influencerWidth,
214
195
  label: label,
215
196
  onClose: onClose,
216
197
  open: open,
217
- size: "wide",
198
+ size: 'wide',
218
199
  slug: slug,
219
200
  title: title,
220
201
  verticalPosition: verticalPosition,
221
- ref: ref
202
+ closeIconDescription: ''
222
203
  }), /*#__PURE__*/React__default["default"].createElement("div", {
223
204
  className: "".concat(blockClass, "__content"),
224
- onBlur: handleBlur,
225
205
  ref: contentRef
226
206
  }, /*#__PURE__*/React__default["default"].createElement(react.Form, {
227
207
  "aria-label": title
@@ -48,7 +48,7 @@ var useParentDimensions = function useParentDimensions(hooks) {
48
48
  setTableHeight(newHeight);
49
49
  };
50
50
  Object.assign(instance, {
51
- tableHeight: tableHeight,
51
+ tableHeight: tableHeight || instance.tableHeight,
52
52
  rootRef: rootRef,
53
53
  headRef: headRef,
54
54
  innerListRef: innerListRef,
@@ -1,7 +1,109 @@
1
+ /**
2
+ * Copyright IBM Corp. 2022, 2022
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, { ReactNode } from 'react';
8
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
9
+ type ActionIcon = {
10
+ id: string;
11
+ icon: CarbonIconType;
12
+ onKeyDown?(): void;
13
+ onClick?(): void;
14
+ iconDescription: string;
15
+ href?: string;
16
+ };
17
+ interface EditUpdateCardsProps {
18
+ /**
19
+ * Icons that are displayed on card. Refer to design documentation for implementation guidelines
20
+ */
21
+ actionIcons?: Array<ActionIcon>;
22
+ /**
23
+ * Determines if the action icons are on the top or bottom of the card
24
+ */
25
+ actionsPlacement?: 'top' | 'bottom';
26
+ /**
27
+ * Optional label for the top of the card.
28
+ */
29
+ className?: string;
30
+ /**
31
+ * Optional header description
32
+ */
33
+ description?: string;
34
+ /**
35
+ * Edit mode children
36
+ */
37
+ editChildren?: ReactNode;
38
+ /**
39
+ * Edit mode
40
+ */
41
+ editMode?: boolean;
42
+ /**
43
+ * Optional label for the top of the card
44
+ */
45
+ label?: string;
46
+ /**
47
+ * Function that's called from the primary button or action icon
48
+ */
49
+ onPrimaryButtonClick?(): void;
50
+ /**
51
+ * Function that's called from the secondary button or action icon
52
+ */
53
+ onSecondaryButtonClick?(): void;
54
+ /**
55
+ * Preview mode children
56
+ */
57
+ previewChildren?: ReactNode;
58
+ /**
59
+ * Optional prop to allow overriding the icon rendering. Can be a React component class
60
+ */
61
+ primaryButtonIcon?: CarbonIconType;
62
+ /**
63
+ * Establishes the kind of button displayed for the primary button
64
+ */
65
+ primaryButtonKind?: 'primary' | 'ghost';
66
+ /**
67
+ * Determines if the primary button is on the top or bottom of the card
68
+ */
69
+ primaryButtonPlacement?: 'top' | 'bottom';
70
+ /**
71
+ * The text that's displayed in the primary button
72
+ */
73
+ primaryButtonText?: string;
74
+ /**
75
+ * Optionally specify an href for your Button to become an <a> element
76
+ */
77
+ secondaryButtonHref?: string;
78
+ /**
79
+ * Optional prop to allow overriding the icon rendering. Can be a React component class
80
+ */
81
+ secondaryButtonIcon?: CarbonIconType;
82
+ /**
83
+ * Establishes the kind of button displayed for the secondary button
84
+ */
85
+ secondaryButtonKind?: 'secondary' | 'ghost';
86
+ /**
87
+ * Determines if the secondary button is on the top or bottom of the card
88
+ */
89
+ secondaryButtonPlacement?: 'top' | 'bottom';
90
+ /**
91
+ * The text that's displayed in the secondary button
92
+ */
93
+ secondaryButtonText?: string;
94
+ /**
95
+ * Title that's displayed at the top of the card
96
+ */
97
+ title?: string;
98
+ /**
99
+ * Determines title size
100
+ */
101
+ titleSize?: 'default' | 'large';
102
+ }
1
103
  /**
2
104
  Editable cards allow a user to view, modify, and save the content contained within the card.
3
105
  These cards are generally used in instances where a user needs to make changes to a resource instances
4
106
  (ex. configuration details), account plan, etc. Editable cards allow a user to edit something within context.
5
107
  */
6
- export let EditUpdateCards: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
7
- import React from 'react';
108
+ export declare let EditUpdateCards: React.ForwardRefExoticComponent<EditUpdateCardsProps & React.RefAttributes<HTMLDivElement>>;
109
+ export {};
@@ -118,6 +118,7 @@ exports.EditUpdateCards.propTypes = {
118
118
  /**
119
119
  * Icons that are displayed on card. Refer to design documentation for implementation guidelines
120
120
  */
121
+ /**@ts-ignore */
121
122
  actionIcons: index["default"].arrayOf(index["default"].shape({
122
123
  id: index["default"].string,
123
124
  icon: index["default"].oneOfType([index["default"].func, index["default"].object]),
@@ -165,6 +166,7 @@ exports.EditUpdateCards.propTypes = {
165
166
  /**
166
167
  * Optional prop to allow overriding the icon rendering. Can be a React component class
167
168
  */
169
+ /**@ts-ignore */
168
170
  primaryButtonIcon: index["default"].oneOfType([index["default"].func, index["default"].object]),
169
171
  /**
170
172
  * Establishes the kind of button displayed for the primary button
@@ -185,6 +187,7 @@ exports.EditUpdateCards.propTypes = {
185
187
  /**
186
188
  * Optional prop to allow overriding the icon rendering. Can be a React component class
187
189
  */
190
+ /**@ts-ignore */
188
191
  secondaryButtonIcon: index["default"].oneOfType([index["default"].func, index["default"].object]),
189
192
  /**
190
193
  * Establishes the kind of button displayed for the secondary button
@@ -1,5 +1,64 @@
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
+ /// <reference path="../../../../src/custom-typings/index.d.ts" />
8
+ import React, { ReactNode } from 'react';
9
+ import { ButtonProps } from '@carbon/react';
10
+ import { CarbonIconType } from '@carbon/icons-react/lib/CarbonIcon';
11
+ interface NotificationsEmptyStateProps {
12
+ /**
13
+ * Empty state action button
14
+ */
15
+ action?: {
16
+ kind?: 'primary' | 'secondary' | 'tertiary';
17
+ renderIcon?: CarbonIconType;
18
+ onClick?: ButtonProps['onClick'];
19
+ text?: string;
20
+ };
21
+ /**
22
+ * Provide an optional class to be applied to the containing node.
23
+ */
24
+ className?: string;
25
+ /**
26
+ * The alt text for empty state svg images. If not provided , title will be used.
27
+ */
28
+ illustrationDescription?: string;
29
+ /**
30
+ * Designates the position of the illustration relative to the content
31
+ */
32
+ illustrationPosition?: 'top' | 'right' | 'bottom' | 'left';
33
+ /**
34
+ * Empty state illustration theme variations.
35
+ * To ensure you use the correct themed illustrations, you can conditionally specify light or dark
36
+ * based on your app's current theme value. Example:
37
+ * `illustrationTheme={appTheme === ('carbon--g100' || 'carbon--g90') ? 'dark' : 'light'}`
38
+ */
39
+ illustrationTheme?: 'light' | 'dark';
40
+ /**
41
+ * Empty state link object
42
+ */
43
+ link?: {
44
+ text?: string | ReactNode;
45
+ href?: string;
46
+ };
47
+ /**
48
+ * Empty state size
49
+ */
50
+ size?: 'lg' | 'sm';
51
+ /**
52
+ * Empty state subtitle
53
+ */
54
+ subtitle: ReactNode;
55
+ /**
56
+ * Empty state title
57
+ */
58
+ title: ReactNode;
59
+ }
1
60
  /**
2
61
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
3
62
  */
4
- export let NotificationsEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
63
+ export declare let NotificationsEmptyState: React.ForwardRefExoticComponent<NotificationsEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
+ export {};
@@ -26,11 +26,9 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
26
26
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
27
27
 
28
28
  var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
29
-
30
29
  // The block part of our conventional BEM class names (blockClass__E--M).
31
30
  var blockClass = "".concat(settings.pkg.prefix, "--empty-state");
32
31
  var componentName = 'NotificationsEmptyState';
33
-
34
32
  /**
35
33
  * The `EmptyState` component follows the Carbon guidelines for empty states with some added specifications around illustration usage. For additional usage guidelines and documentation please refer to the links above.
36
34
  */
@@ -59,7 +57,7 @@ exports.NotificationsEmptyState = /*#__PURE__*/React__default["default"].forward
59
57
  link: link,
60
58
  size: size,
61
59
  subtitle: subtitle,
62
- title: title
60
+ title: title || ''
63
61
  }));
64
62
  });
65
63
 
@@ -1,2 +1,97 @@
1
- export let ExpressiveCard: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- import React from 'react';
1
+ import React, { PropsWithChildren, ReactNode } from 'react';
2
+ type ActionIcon = {
3
+ id?: string;
4
+ icon?: () => void | object;
5
+ onKeydown?: () => void;
6
+ onClick?: () => void;
7
+ iconDescription?: string;
8
+ href?: string;
9
+ };
10
+ interface ExpressiveCardProps extends PropsWithChildren {
11
+ /**
12
+ * Icons that are displayed on card. Refer to design documentation for implementation guidelines. Note- href will supersede onClick
13
+ */
14
+ actionIcons?: ActionIcon[];
15
+ /**
16
+ * Content that shows in the body of the card
17
+ */
18
+ /**
19
+ * Optional user provided class
20
+ */
21
+ className?: string;
22
+ /**
23
+ * Optional header description
24
+ */
25
+ description?: string | object | ReactNode;
26
+ /**
27
+ * Optional label for the top of the card
28
+ */
29
+ label?: string | object | ReactNode;
30
+ /**
31
+ * Optional media content like an image to be placed in the card
32
+ */
33
+ media?: ReactNode;
34
+ /**
35
+ * Establishes the position of the media in the card
36
+ */
37
+ mediaPosition?: 'top' | 'left';
38
+ /**
39
+ * Provides the callback for a clickable card
40
+ */
41
+ onClick?: () => void;
42
+ /**
43
+ * Function that's called from the primary button or action icon
44
+ */
45
+ onPrimaryButtonClick?: () => void;
46
+ /**
47
+ * Function that's called from the secondary button
48
+ */
49
+ onSecondaryButtonClick?: () => void;
50
+ /**
51
+ * Provides the icon that's displayed at the top of the card
52
+ */
53
+ pictogram?: () => void | object;
54
+ /**
55
+ * Optionally specify an href for your Button to become an <a> element
56
+ */
57
+ primaryButtonHref?: string;
58
+ /**
59
+ * Optional prop to allow overriding the icon rendering. Can be a React component class
60
+ */
61
+ primaryButtonIcon?: () => void | object;
62
+ /**
63
+ * Establishes the kind of button displayed for the primary button
64
+ */
65
+ primaryButtonKind?: 'primary' | 'ghost';
66
+ /**
67
+ * The text that's displayed in the primary button
68
+ */
69
+ primaryButtonText?: string;
70
+ /**
71
+ * Optionally specify an href for your Button to become an <a> element
72
+ */
73
+ secondaryButtonHref?: string;
74
+ /**
75
+ * Optional prop to allow overriding the icon rendering. Can be a React component class
76
+ */
77
+ secondaryButtonIcon?: () => void | object;
78
+ /**
79
+ * Establishes the kind of button displayed for the secondary button
80
+ */
81
+ secondaryButtonKind?: 'secondary' | 'ghost';
82
+ /**
83
+ * The text that's displayed in the secondary button
84
+ */
85
+ secondaryButtonText?: string;
86
+ /**
87
+ * **Experimental:** For all cases a `Slug` component can be provided.
88
+ * Clickable tiles only accept a boolean value of true and display a hollow slug.
89
+ */
90
+ slug?: ReactNode | boolean;
91
+ /**
92
+ * Title that's displayed at the top of the card
93
+ */
94
+ title?: string | object | ReactNode;
95
+ }
96
+ export declare let ExpressiveCard: React.ForwardRefExoticComponent<ExpressiveCardProps & React.RefAttributes<HTMLDivElement>>;
97
+ export {};
@@ -35,6 +35,7 @@ exports.ExpressiveCard.propTypes = {
35
35
  /**
36
36
  * Icons that are displayed on card. Refer to design documentation for implementation guidelines. Note- href will supersede onClick
37
37
  */
38
+ /**@ts-ignore */
38
39
  actionIcons: index["default"].arrayOf(index["default"].shape({
39
40
  id: index["default"].string,
40
41
  icon: index["default"].oneOfType([index["default"].func, index["default"].object]),
@@ -82,6 +83,7 @@ exports.ExpressiveCard.propTypes = {
82
83
  /**
83
84
  * Provides the icon that's displayed at the top of the card
84
85
  */
86
+ /**@ts-ignore */
85
87
  pictogram: index["default"].oneOfType([index["default"].func, index["default"].object]),
86
88
  /**
87
89
  * Optionally specify an href for your Button to become an <a> element
@@ -90,6 +92,7 @@ exports.ExpressiveCard.propTypes = {
90
92
  /**
91
93
  * Optional prop to allow overriding the icon rendering. Can be a React component class
92
94
  */
95
+ /**@ts-ignore */
93
96
  primaryButtonIcon: index["default"].oneOfType([index["default"].func, index["default"].object]),
94
97
  /**
95
98
  * Establishes the kind of button displayed for the primary button
@@ -106,6 +109,7 @@ exports.ExpressiveCard.propTypes = {
106
109
  /**
107
110
  * Optional prop to allow overriding the icon rendering. Can be a React component class
108
111
  */
112
+ /**@ts-ignore */
109
113
  secondaryButtonIcon: index["default"].oneOfType([index["default"].func, index["default"].object]),
110
114
  /**
111
115
  * Establishes the kind of button displayed for the secondary button
@@ -1,5 +1,24 @@
1
+ /**
2
+ * Copyright IBM Corp. 2023, 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
+ import React, { ReactNode } from 'react';
8
+ interface InlineTipButtonProps {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * Provide the contents of the InlineTip.
15
+ */
16
+ children: ReactNode;
17
+ }
1
18
  /**
2
19
  * This is a standard Carbon button, styled specifically for use inside InlineTip.
3
20
  */
4
- export let InlineTipButton: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
21
+ export declare let InlineTipButton: React.ForwardRefExoticComponent<InlineTipButtonProps & {
22
+ children?: React.ReactNode;
23
+ } & React.RefAttributes<HTMLButtonElement>>;
24
+ export {};