@carbon/ibm-products 2.34.0 → 2.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. package/css/index-full-carbon.css +31910 -32273
  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 +38 -17
  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 +568 -24320
  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 +2145 -17925
  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/components/ActionSet/ActionSet.d.ts +38 -2
  18. package/es/components/ActionSet/ActionSet.js +3 -5
  19. package/es/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  20. package/es/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  21. package/es/components/ConditionBuilder/ConditionBuilder.js +125 -0
  22. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  23. package/es/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +92 -0
  24. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  25. package/es/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +88 -0
  26. package/es/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  27. package/es/components/ConditionBuilder/index.d.ts +1 -0
  28. package/es/components/CreateFullPage/CreateFullPage.js +3 -19
  29. package/es/components/CreateFullPage/CreateFullPageStep.js +22 -7
  30. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  31. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  32. package/es/components/Datagrid/useEditableCell.js +15 -0
  33. package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
  34. package/es/components/DelimitedList/DelimitedList.js +0 -1
  35. package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
  36. package/es/components/EditInPlace/EditInPlace.js +10 -6
  37. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  38. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  39. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  40. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  41. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  42. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  43. package/es/components/ExportModal/ExportModal.d.ts +110 -2
  44. package/es/components/ExportModal/ExportModal.js +10 -4
  45. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
  46. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
  47. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  48. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
  49. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
  50. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  51. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
  52. package/es/components/FilterPanel/index.d.ts +1 -0
  53. package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  54. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  55. package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  56. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  57. package/es/components/ImportModal/ImportModal.d.ts +136 -2
  58. package/es/components/ImportModal/ImportModal.js +3 -2
  59. package/es/components/InlineTip/InlineTip.d.ts +90 -2
  60. package/es/components/InlineTip/InlineTip.js +3 -2
  61. package/es/components/Nav/Nav.js +1 -1
  62. package/es/components/Nav/NavList.js +7 -7
  63. package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
  64. package/es/components/PageHeader/PageHeader.js +3 -3
  65. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  66. package/es/components/PageHeader/PageHeaderUtils.js +4 -3
  67. package/es/components/SidePanel/SidePanel.js +52 -36
  68. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  69. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  70. package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
  71. package/es/components/TagOverflow/TagOverflow.js +209 -0
  72. package/es/components/TagOverflow/constants.d.ts +14 -0
  73. package/es/components/TagOverflow/constants.js +30 -0
  74. package/es/components/TagOverflow/index.d.ts +1 -0
  75. package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  76. package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
  77. package/es/components/Toolbar/Toolbar.d.ts +23 -5
  78. package/es/components/Toolbar/Toolbar.js +30 -26
  79. package/es/components/UserAvatar/UserAvatar.js +4 -2
  80. package/es/components/index.d.ts +4 -2
  81. package/es/global/js/package-settings.d.ts +3 -0
  82. package/es/global/js/package-settings.js +3 -0
  83. package/es/index.js +4 -0
  84. package/es/settings.d.ts +3 -0
  85. package/lib/components/ActionSet/ActionSet.d.ts +38 -2
  86. package/lib/components/ActionSet/ActionSet.js +3 -5
  87. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  88. package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  89. package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
  90. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  91. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
  92. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  93. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
  94. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  95. package/lib/components/ConditionBuilder/index.d.ts +1 -0
  96. package/lib/components/CreateFullPage/CreateFullPage.js +2 -18
  97. package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
  98. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  99. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  100. package/lib/components/Datagrid/useEditableCell.js +19 -0
  101. package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
  102. package/lib/components/DelimitedList/DelimitedList.js +0 -1
  103. package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
  104. package/lib/components/EditInPlace/EditInPlace.js +10 -6
  105. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  106. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  107. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  108. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  109. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  110. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  111. package/lib/components/ExportModal/ExportModal.d.ts +110 -2
  112. package/lib/components/ExportModal/ExportModal.js +10 -4
  113. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +1 -1
  114. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +2 -2
  115. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  116. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +5 -9
  117. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +1 -1
  118. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  119. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
  120. package/lib/components/FilterPanel/index.d.ts +1 -0
  121. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  122. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  123. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  124. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  125. package/lib/components/ImportModal/ImportModal.d.ts +136 -2
  126. package/lib/components/ImportModal/ImportModal.js +3 -2
  127. package/lib/components/InlineTip/InlineTip.d.ts +90 -2
  128. package/lib/components/InlineTip/InlineTip.js +3 -2
  129. package/lib/components/Nav/Nav.js +1 -1
  130. package/lib/components/Nav/NavList.js +7 -7
  131. package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
  132. package/lib/components/PageHeader/PageHeader.js +3 -3
  133. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  134. package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
  135. package/lib/components/SidePanel/SidePanel.js +52 -36
  136. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  137. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  138. package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
  139. package/lib/components/TagOverflow/TagOverflow.js +216 -0
  140. package/lib/components/TagOverflow/constants.d.ts +14 -0
  141. package/lib/components/TagOverflow/constants.js +34 -0
  142. package/lib/components/TagOverflow/index.d.ts +1 -0
  143. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  144. package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
  145. package/lib/components/Toolbar/Toolbar.d.ts +23 -5
  146. package/lib/components/Toolbar/Toolbar.js +30 -26
  147. package/lib/components/UserAvatar/UserAvatar.js +4 -2
  148. package/lib/components/index.d.ts +4 -2
  149. package/lib/global/js/package-settings.d.ts +3 -0
  150. package/lib/global/js/package-settings.js +3 -0
  151. package/lib/index.js +17 -0
  152. package/lib/settings.d.ts +3 -0
  153. package/package.json +3 -3
  154. package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
  155. package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
  156. package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
  157. package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
  158. package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
  159. package/scss/components/ConditionBuilder/_index.scss +8 -0
  160. package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
  161. package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
  162. package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
  163. package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +1 -3
  164. package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +0 -2
  165. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +0 -1
  166. package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
  167. package/scss/components/FilterPanel/_index-with-carbon.scss +1 -0
  168. package/scss/components/FilterPanel/_index.scss +1 -0
  169. package/scss/components/Guidebanner/_guidebanner.scss +1 -1
  170. package/scss/components/InlineTip/_inline-tip.scss +1 -1
  171. package/scss/components/ProductiveCard/_productive-card.scss +13 -0
  172. package/scss/components/SidePanel/_side-panel.scss +9 -9
  173. package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
  174. package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
  175. package/scss/components/TagOverflow/_index.scss +8 -0
  176. package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
  177. package/scss/components/Tearsheet/_tearsheet.scss +10 -0
  178. package/scss/components/UserAvatar/_user-avatar.scss +1 -0
  179. package/scss/components/_index-with-carbon.scss +2 -0
  180. package/scss/components/_index.scss +2 -0
@@ -1,6 +1,86 @@
1
+ /**
2
+ * Copyright IBM Corp. 2021, 2021
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, { PropsWithChildren, ReactNode } from 'react';
8
+ type VerticalPosition = 'normal' | 'lower';
9
+ interface CreateTearsheetNarrowProps extends PropsWithChildren {
10
+ /**
11
+ * Provide the contents of the CreateTearsheetNarrow.
12
+ */
13
+ children: ReactNode;
14
+ /**
15
+ * Provide an optional class to be applied to the containing node.
16
+ */
17
+ className?: string;
18
+ /**
19
+ * A description of the flow, displayed in the header area of the tearsheet.
20
+ */
21
+ description?: ReactNode;
22
+ /**
23
+ * Specifies a boolean for disabling or enabling the primary button. This is important for form validation
24
+ * Returning `true` prevents the primary button from being clicked until required fields are completed.
25
+ */
26
+ disableSubmit?: boolean;
27
+ /**
28
+ * Specifies an optional field that provides a additional context for a form
29
+ */
30
+ formDescription?: ReactNode;
31
+ /**
32
+ * Specifies a field that provides a title for a form
33
+ */
34
+ formTitle?: ReactNode;
35
+ /**
36
+ * A label for the tearsheet, displayed in the header area of the tearsheet
37
+ * to maintain context for the tearsheet (e.g. as the title changes from page
38
+ * to page of a multi-page task).
39
+ */
40
+ label?: ReactNode;
41
+ /**
42
+ * An optional handler that is called when the user closes the tearsheet (by
43
+ * clicking the close button, if enabled, or clicking outside, if enabled).
44
+ * Returning `false` here prevents the modal from closing.
45
+ */
46
+ onRequestClose?: () => void;
47
+ /**
48
+ * Specifies an optional handler which is called when the CreateTearsheetNarrow
49
+ * primary button is pressed.
50
+ */
51
+ onRequestSubmit?: () => void;
52
+ /**
53
+ * Specifies whether the tearsheet is currently open.
54
+ */
55
+ open?: boolean;
56
+ /**
57
+ * Specifies the primary button's text in the CreateTearsheetNarrow.
58
+ */
59
+ primaryButtonText: string;
60
+ /**
61
+ * Specifies the secondary button's text in the CreateTearsheetNarrow.
62
+ */
63
+ secondaryButtonText: string;
64
+ /**
65
+ * Specifies which DOM element in the form should be focused.
66
+ */
67
+ selectorPrimaryFocus?: ReactNode;
68
+ /**
69
+ * The main title of the tearsheet, displayed in the header area.
70
+ */
71
+ title?: ReactNode;
72
+ /**
73
+ * The position of the top of tearsheet in the viewport. The 'normal'
74
+ * position (the default) is a short distance down from the top of the
75
+ * viewport, leaving room at the top for a global header bar to show through
76
+ * from below. The 'lower' position provides a little extra room at the top
77
+ * to allow an action bar navigation or breadcrumbs to also show through.
78
+ */
79
+ verticalPosition?: VerticalPosition;
80
+ }
1
81
  /**
2
82
  * Use a narrow tearsheet as an alternative to a modal when there is scrolling.
3
83
  * Use when the form fields can be broken down into sections using section headers.
4
84
  */
5
- export let CreateTearsheetNarrow: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
6
- import React from 'react';
85
+ export declare let CreateTearsheetNarrow: React.ForwardRefExoticComponent<CreateTearsheetNarrowProps & React.RefAttributes<unknown>>;
86
+ export {};
@@ -90,7 +90,8 @@ var stateReducer = function stateReducer(newState, action) {
90
90
  if (rows) {
91
91
  var newSelectedRowData = {};
92
92
  rows.forEach(function (row) {
93
- var props = row.getRowProps();
93
+ var _row$getRowProps;
94
+ var props = (_row$getRowProps = row.getRowProps) === null || _row$getRowProps === void 0 ? void 0 : _row$getRowProps.call(row);
94
95
  if (props && props.disabled) {
95
96
  return;
96
97
  }
@@ -0,0 +1,15 @@
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
+
8
+ import useInlineEdit from './useInlineEdit.js';
9
+
10
+ var useEditableCell = function useEditableCell(hooks) {
11
+ useInlineEdit(hooks, 'usingEditableCell');
12
+ };
13
+ var useEditableCell$1 = useEditableCell;
14
+
15
+ export { useEditableCell$1 as default };
@@ -1,6 +1,31 @@
1
+ /**
2
+ * Copyright IBM Corp. 2024, 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, { PropsWithChildren } from 'react';
8
+ interface DelimitedListProps extends PropsWithChildren {
9
+ /**
10
+ * Provide an optional class to be applied to the containing node.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * The character(s) used to separate the items.
15
+ */
16
+ delimiter?: string;
17
+ /**
18
+ * Array of items to be listed.
19
+ */
20
+ items?: any[];
21
+ /**
22
+ * Toggle the component's ability to truncate or not.
23
+ */
24
+ truncate?: boolean;
25
+ }
1
26
  /**
2
27
  * `DelimitedList` converts an array of items into a single line of
3
28
  * comma-separated values.
4
29
  */
5
- export let DelimitedList: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
6
- import React from 'react';
30
+ export declare let DelimitedList: React.ForwardRefExoticComponent<DelimitedListProps & React.RefAttributes<HTMLDivElement>>;
31
+ export {};
@@ -20,7 +20,6 @@ var defaults = {
20
20
  items: [],
21
21
  truncate: true
22
22
  };
23
-
24
23
  /**
25
24
  * `DelimitedList` converts an array of items into a single line of
26
25
  * comma-separated values.
@@ -1,6 +1,98 @@
1
- export let EditInPlace: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
2
- export namespace deprecatedProps {
3
- let invalidText: PropTypes.Requireable<string>;
4
- }
5
- import React from 'react';
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, { PropsWithChildren } from 'react';
6
8
  import PropTypes from 'prop-types';
9
+ type Size = 'sm' | 'md' | 'lg';
10
+ type AlignPropType = 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
11
+ type Shape = {
12
+ cancel: AlignPropType;
13
+ edit: AlignPropType;
14
+ save: AlignPropType;
15
+ };
16
+ interface EditInplaceProps extends PropsWithChildren {
17
+ /**
18
+ * label for cancel button
19
+ */
20
+ cancelLabel: string;
21
+ /**
22
+ * By default the edit icon is shown on hover only.
23
+ */
24
+ editAlwaysVisible?: boolean;
25
+ /**
26
+ * label for edit button
27
+ */
28
+ editLabel: string;
29
+ /**
30
+ * Specify a custom id for the input
31
+ */
32
+ id: string;
33
+ /**
34
+ * inheritTypography - causes the text entry field to inherit typography settings
35
+ * assigned to the container. This is useful when editing titles for instance.
36
+ *
37
+ * NOTE: The size property limits the vertical size of the input element.
38
+ * Inherited font's should be selected to fit within the size selected.
39
+ */
40
+ inheritTypography?: boolean;
41
+ /**
42
+ * determines if the input is invalid
43
+ */
44
+ invalid?: boolean;
45
+ /**
46
+ * text that is displayed if the input is invalid
47
+ */
48
+ invalidText?: string;
49
+ /**
50
+ * Provide the text that will be read by a screen reader when visiting this control
51
+ */
52
+ labelText: string;
53
+ /**
54
+ * handler that is called when the cancel button is pressed or when the user removes focus from the input and there is no new value
55
+ */
56
+ onCancel: (value: string) => void;
57
+ /**
58
+ * handler that is called when the input is updated
59
+ */
60
+ onChange: (value: string) => void;
61
+ /**
62
+ * handler that is called when the save button is pressed or when the user removes focus from the input if it has a new value
63
+ */
64
+ onSave: () => void;
65
+ /**
66
+ * determines if the input is in readOnly mode
67
+ */
68
+ /**
69
+ * label for the edit button that displays when in read only mode
70
+ */
71
+ /**
72
+ * label for save button
73
+ */
74
+ saveLabel: string;
75
+ /**
76
+ * vertical size of control
77
+ */
78
+ size?: Size;
79
+ /**
80
+ * tooltipAlignment from the standard tooltip. Default center.
81
+ *
82
+ * Can be passed either as one of tooltip options or as an object specifying cancel, edit and save separately
83
+ */
84
+ tooltipAlignment?: AlignPropType | Shape;
85
+ /**
86
+ * current value of the input
87
+ */
88
+ value: string;
89
+ }
90
+ export declare let EditInPlace: React.ForwardRefExoticComponent<EditInplaceProps & React.RefAttributes<HTMLDivElement>>;
91
+ export declare const deprecatedProps: {
92
+ /**
93
+ * **Deprecated**
94
+ * invalidLabel was misnamed, using invalidText to match Carbon
95
+ */
96
+ invalidText: PropTypes.Requireable<string>;
97
+ };
98
+ export {};
@@ -29,7 +29,8 @@ var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
29
29
  id = _ref.id,
30
30
  inheritTypography = _ref.inheritTypography,
31
31
  invalid = _ref.invalid,
32
- deprecated_invalidLabel = _ref.invalidLabel,
32
+ _ref$invalidLabel = _ref.invalidLabel,
33
+ deprecated_invalidLabel = _ref$invalidLabel === void 0 ? ' ' : _ref$invalidLabel,
33
34
  invalidText = _ref.invalidText,
34
35
  labelText = _ref.labelText,
35
36
  onCancel = _ref.onCancel,
@@ -37,7 +38,7 @@ var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
37
38
  onSave = _ref.onSave,
38
39
  saveLabel = _ref.saveLabel,
39
40
  _ref$size = _ref.size,
40
- size = _ref$size === void 0 ? defaults.size : _ref$size,
41
+ size = _ref$size === void 0 ? 'sm' : _ref$size,
41
42
  tooltipAlignment = _ref.tooltipAlignment,
42
43
  value = _ref.value,
43
44
  rest = _objectWithoutProperties(_ref, _excluded);
@@ -85,7 +86,8 @@ var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
85
86
  // }
86
87
 
87
88
  if (!isTargetingChild(e)) {
88
- inputRef.current.focus();
89
+ var _inputRef$current;
90
+ (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 || _inputRef$current.focus();
89
91
  setFocused(true);
90
92
  }
91
93
  };
@@ -122,15 +124,16 @@ var EditInPlace = /*#__PURE__*/forwardRef(function (_ref, ref) {
122
124
  onCancelHandler();
123
125
  };
124
126
  var onKeyHandler = function onKeyHandler(e) {
127
+ var _inputRef$current2, _inputRef$current3;
125
128
  // to prevent blur handler from being called twice add additional state to check if escape is being used
126
129
  escaping.current = true;
127
130
  switch (e.key) {
128
131
  case 'Escape':
129
- inputRef.current.blur();
132
+ (_inputRef$current2 = inputRef.current) === null || _inputRef$current2 === void 0 || _inputRef$current2.blur();
130
133
  escapeHandler();
131
134
  break;
132
135
  case 'Enter':
133
- inputRef.current.blur();
136
+ (_inputRef$current3 = inputRef.current) === null || _inputRef$current3 === void 0 || _inputRef$current3.blur();
134
137
  returnHandler();
135
138
  break;
136
139
  }
@@ -219,7 +222,6 @@ EditInPlace.propTypes = _objectSpread2({
219
222
  * By default the edit icon is shown on hover only.
220
223
  */
221
224
  editAlwaysVisible: PropTypes.bool,
222
- /**
223
225
  /**
224
226
  * label for edit button
225
227
  */
@@ -243,6 +245,7 @@ EditInPlace.propTypes = _objectSpread2({
243
245
  /**
244
246
  * text that is displayed if the input is invalid
245
247
  */
248
+ /**@ts-ignore*/
246
249
  invalidText: PropTypes.string,
247
250
  /**
248
251
  * Provide the text that will be read by a screen reader when visiting this control
@@ -281,6 +284,7 @@ EditInPlace.propTypes = _objectSpread2({
281
284
  *
282
285
  * Can be passed either as one of tooltip options or as an object specifying cancel, edit and save separately
283
286
  */
287
+ /**@ts-ignore*/
284
288
  tooltipAlignment: PropTypes.oneOfType([alignPropType, PropTypes.shape({
285
289
  cancel: alignPropType,
286
290
  edit: alignPropType,
@@ -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 ErrorEmptyStateProps {
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?: string | ReactNode;
55
+ /**
56
+ * Empty state title
57
+ */
58
+ title: string | 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 ErrorEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
63
+ export declare let ErrorEmptyState: React.ForwardRefExoticComponent<ErrorEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
+ export {};
@@ -17,11 +17,9 @@ import ErrorIllustration from '../assets/ErrorIllustration.js';
17
17
  import { defaults } from '../EmptyState.js';
18
18
 
19
19
  var _excluded = ["action", "className", "illustrationPosition", "illustrationDescription", "illustrationTheme", "link", "size", "subtitle", "title"];
20
-
21
20
  // The block part of our conventional BEM class names (blockClass__E--M).
22
21
  var blockClass = "".concat(pkg.prefix, "--empty-state");
23
22
  var componentName = 'ErrorEmptyState';
24
-
25
23
  /**
26
24
  * 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.
27
25
  */
@@ -50,7 +48,7 @@ var ErrorEmptyState = /*#__PURE__*/React__default.forwardRef(function (_ref, ref
50
48
  link: link,
51
49
  size: size,
52
50
  subtitle: subtitle,
53
- title: title
51
+ title: title || ''
54
52
  }));
55
53
  });
56
54
 
@@ -1,5 +1,64 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2021
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 NoDataEmptyStateProps {
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?: string | React.ReactNode;
55
+ /**
56
+ * Empty state title
57
+ */
58
+ title: string | React.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 NoDataEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
63
+ export declare let NoDataEmptyState: React.ForwardRefExoticComponent<NoDataEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
+ export {};
@@ -21,7 +21,6 @@ var _excluded = ["action", "className", "illustrationPosition", "illustrationThe
21
21
  // The block part of our conventional BEM class names (blockClass__E--M).
22
22
  var blockClass = "".concat(pkg.prefix, "--empty-state");
23
23
  var componentName = 'NoDataEmptyState';
24
-
25
24
  /**
26
25
  * 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.
27
26
  */
@@ -50,7 +49,7 @@ var NoDataEmptyState = /*#__PURE__*/React__default.forwardRef(function (_ref, re
50
49
  link: link,
51
50
  size: size,
52
51
  subtitle: subtitle,
53
- title: title
52
+ title: title || ''
54
53
  }));
55
54
  });
56
55
 
@@ -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 NotFoundEmptyStateProps {
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: string | ReactNode;
55
+ /**
56
+ * Empty state title
57
+ */
58
+ title: string | 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 NotFoundEmptyState: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
- import React from 'react';
63
+ export declare let NotFoundEmptyState: React.ForwardRefExoticComponent<NotFoundEmptyStateProps & React.RefAttributes<HTMLDivElement>>;
64
+ export {};
@@ -17,11 +17,9 @@ import NotFoundIllustration from '../assets/NotFoundIllustration.js';
17
17
  import { defaults } from '../EmptyState.js';
18
18
 
19
19
  var _excluded = ["action", "className", "illustrationPosition", "illustrationTheme", "illustrationDescription", "link", "size", "subtitle", "title"];
20
-
21
20
  // The block part of our conventional BEM class names (blockClass__E--M).
22
21
  var blockClass = "".concat(pkg.prefix, "--empty-state");
23
22
  var componentName = 'NotFoundEmptyState';
24
-
25
23
  /**
26
24
  * 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.
27
25
  */
@@ -50,7 +48,7 @@ var NotFoundEmptyState = /*#__PURE__*/React__default.forwardRef(function (_ref,
50
48
  link: link,
51
49
  size: size,
52
50
  subtitle: subtitle,
53
- title: title
51
+ title: title || ''
54
52
  }));
55
53
  });
56
54