@carbon/ibm-products 1.6.1 → 1.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. package/css/index-full-carbon.css +224 -143
  2. package/css/index-full-carbon.css.map +1 -1
  3. package/css/index-full-carbon.min.css +3 -3
  4. package/css/index-full-carbon.min.css.map +1 -1
  5. package/css/index-without-carbon-released-only.css +1 -2
  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 +178 -142
  10. package/css/index-without-carbon.css.map +1 -1
  11. package/css/index-without-carbon.min.css +3 -3
  12. package/css/index-without-carbon.min.css.map +1 -1
  13. package/css/index.css +178 -142
  14. package/css/index.css.map +1 -1
  15. package/css/index.min.css +3 -3
  16. package/css/index.min.css.map +1 -1
  17. package/es/components/APIKeyModal/APIKeyModal.js +10 -13
  18. package/es/components/ActionBar/ActionBar.js +0 -3
  19. package/es/components/ActionBar/ActionBarItem.js +2 -6
  20. package/es/components/ActionSet/ActionSet.js +11 -13
  21. package/es/components/AddSelect/AddSelect.js +121 -25
  22. package/es/components/AddSelect/AddSelectBreadcrumbs.js +5 -5
  23. package/es/components/AddSelect/AddSelectColumn.js +21 -0
  24. package/es/components/AddSelect/AddSelectList.js +68 -9
  25. package/es/components/AddSelect/AddSelectSidebar.js +43 -5
  26. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +0 -3
  27. package/es/components/ButtonMenu/ButtonMenu.js +6 -4
  28. package/es/components/ButtonMenu/ButtonMenuItem.js +1 -2
  29. package/es/components/Card/Card.js +31 -21
  30. package/es/components/Card/CardFooter.js +14 -10
  31. package/es/components/Card/CardHeader.js +8 -6
  32. package/es/components/Cascade/Cascade.js +5 -4
  33. package/es/components/ComboButton/ComboButton.js +0 -4
  34. package/es/components/ComboButton/ComboButtonItem/index.js +0 -5
  35. package/es/components/CreateFullPage/CreateFullPageStep.js +15 -8
  36. package/es/components/CreateModal/CreateModal.js +1 -4
  37. package/es/components/CreateTearsheet/CreateTearsheet.js +10 -11
  38. package/es/components/CreateTearsheet/CreateTearsheetStep.js +18 -14
  39. package/es/components/DataSpreadsheet/DataSpreadsheet.js +454 -0
  40. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +322 -0
  41. package/es/components/DataSpreadsheet/DataSpreadsheetHeader.js +64 -0
  42. package/es/components/DataSpreadsheet/createActiveCellFn.js +45 -0
  43. package/es/components/DataSpreadsheet/createCellSelectionArea.js +45 -0
  44. package/es/components/DataSpreadsheet/generateData.js +47 -0
  45. package/es/components/DataSpreadsheet/getCellSize.js +30 -0
  46. package/es/components/{CancelableTextEdit → DataSpreadsheet}/index.js +2 -2
  47. package/es/components/EditSidePanel/EditSidePanel.js +9 -10
  48. package/es/components/EmptyStates/EmptyState.js +7 -6
  49. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +4 -8
  50. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +4 -8
  51. package/es/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +4 -8
  52. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +4 -8
  53. package/es/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +4 -8
  54. package/es/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +4 -8
  55. package/es/components/ExampleComponent/ExampleComponent.js +12 -13
  56. package/es/components/ExportModal/ExportModal.js +13 -9
  57. package/es/components/ExpressiveCard/ExpressiveCard.js +0 -8
  58. package/es/components/ImportModal/ImportModal.js +7 -5
  59. package/es/components/InlineEdit/InlineEdit.js +51 -46
  60. package/es/components/LoadingBar/LoadingBar.js +13 -17
  61. package/es/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -4
  62. package/es/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -5
  63. package/es/components/ModifiedTabs/ModifiedTabs.js +24 -18
  64. package/es/components/NotificationsPanel/NotificationsPanel.js +109 -86
  65. package/es/components/OptionsTile/OptionsTile.js +6 -9
  66. package/es/components/PageHeader/PageHeader.js +10 -7
  67. package/es/components/ProductiveCard/ProductiveCard.js +23 -12
  68. package/es/components/RemoveModal/RemoveModal.js +0 -3
  69. package/es/components/SidePanel/SidePanel.js +22 -17
  70. package/es/components/TagSet/TagSet.js +13 -9
  71. package/es/components/TagSet/TagSetModal.js +16 -12
  72. package/es/components/TagSet/TagSetOverflow.js +21 -13
  73. package/es/components/Tearsheet/Tearsheet.js +27 -18
  74. package/es/components/Tearsheet/TearsheetNarrow.js +18 -15
  75. package/es/components/Tearsheet/TearsheetShell.js +3 -4
  76. package/es/components/Toolbar/ToolbarButton.js +0 -3
  77. package/es/components/WebTerminal/WebTerminal.js +17 -18
  78. package/es/components/index.js +2 -2
  79. package/es/global/js/hooks/index.js +1 -0
  80. package/es/global/js/hooks/useActiveElement.js +27 -0
  81. package/es/global/js/package-settings.js +2 -1
  82. package/es/global/js/utils/DisplayBox.js +31 -0
  83. package/es/global/js/utils/Wrap.js +7 -5
  84. package/es/global/js/utils/deepCloneObject.js +26 -0
  85. package/es/global/js/utils/getScrollbarWidth.js +14 -0
  86. package/lib/components/APIKeyModal/APIKeyModal.js +10 -13
  87. package/lib/components/ActionBar/ActionBar.js +0 -3
  88. package/lib/components/ActionBar/ActionBarItem.js +2 -6
  89. package/lib/components/ActionSet/ActionSet.js +11 -13
  90. package/lib/components/AddSelect/AddSelect.js +119 -24
  91. package/lib/components/AddSelect/AddSelectBreadcrumbs.js +3 -4
  92. package/lib/components/AddSelect/AddSelectColumn.js +37 -0
  93. package/lib/components/AddSelect/AddSelectList.js +66 -9
  94. package/lib/components/AddSelect/AddSelectSidebar.js +43 -4
  95. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +0 -3
  96. package/lib/components/ButtonMenu/ButtonMenu.js +6 -4
  97. package/lib/components/ButtonMenu/ButtonMenuItem.js +1 -2
  98. package/lib/components/Card/Card.js +31 -21
  99. package/lib/components/Card/CardFooter.js +14 -10
  100. package/lib/components/Card/CardHeader.js +8 -6
  101. package/lib/components/Cascade/Cascade.js +5 -4
  102. package/lib/components/ComboButton/ComboButton.js +0 -4
  103. package/lib/components/ComboButton/ComboButtonItem/index.js +0 -5
  104. package/lib/components/CreateFullPage/CreateFullPageStep.js +17 -14
  105. package/lib/components/CreateModal/CreateModal.js +1 -4
  106. package/lib/components/CreateTearsheet/CreateTearsheet.js +10 -11
  107. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +20 -20
  108. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +478 -0
  109. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +349 -0
  110. package/lib/components/DataSpreadsheet/DataSpreadsheetHeader.js +80 -0
  111. package/lib/components/DataSpreadsheet/createActiveCellFn.js +56 -0
  112. package/lib/components/DataSpreadsheet/createCellSelectionArea.js +56 -0
  113. package/lib/components/DataSpreadsheet/generateData.js +58 -0
  114. package/lib/components/DataSpreadsheet/getCellSize.js +39 -0
  115. package/lib/components/DataSpreadsheet/index.js +13 -0
  116. package/lib/components/EditSidePanel/EditSidePanel.js +9 -10
  117. package/lib/components/EmptyStates/EmptyState.js +9 -8
  118. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +3 -7
  119. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +3 -7
  120. package/lib/components/EmptyStates/NoTagsEmptyState/NoTagsEmptyState.js +3 -7
  121. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +3 -7
  122. package/lib/components/EmptyStates/NotificationsEmptyState/NotificationsEmptyState.js +3 -7
  123. package/lib/components/EmptyStates/UnauthorizedEmptyState/UnauthorizedEmptyState.js +3 -7
  124. package/lib/components/ExampleComponent/ExampleComponent.js +12 -13
  125. package/lib/components/ExportModal/ExportModal.js +13 -9
  126. package/lib/components/ExpressiveCard/ExpressiveCard.js +0 -8
  127. package/lib/components/ImportModal/ImportModal.js +7 -5
  128. package/lib/components/InlineEdit/InlineEdit.js +51 -46
  129. package/lib/components/LoadingBar/LoadingBar.js +13 -17
  130. package/lib/components/ModifiedTabs/ModifiedTabLabelNew.js +0 -4
  131. package/lib/components/ModifiedTabs/ModifiedTabLabelWithClose.js +0 -5
  132. package/lib/components/ModifiedTabs/ModifiedTabs.js +24 -18
  133. package/lib/components/NotificationsPanel/NotificationsPanel.js +109 -86
  134. package/lib/components/OptionsTile/OptionsTile.js +6 -9
  135. package/lib/components/PageHeader/PageHeader.js +9 -6
  136. package/lib/components/ProductiveCard/ProductiveCard.js +24 -18
  137. package/lib/components/RemoveModal/RemoveModal.js +0 -3
  138. package/lib/components/SidePanel/SidePanel.js +22 -17
  139. package/lib/components/TagSet/TagSet.js +13 -9
  140. package/lib/components/TagSet/TagSetModal.js +17 -13
  141. package/lib/components/TagSet/TagSetOverflow.js +24 -19
  142. package/lib/components/Tearsheet/Tearsheet.js +26 -17
  143. package/lib/components/Tearsheet/TearsheetNarrow.js +18 -15
  144. package/lib/components/Tearsheet/TearsheetShell.js +2 -3
  145. package/lib/components/Toolbar/ToolbarButton.js +0 -3
  146. package/lib/components/WebTerminal/WebTerminal.js +17 -18
  147. package/lib/components/index.js +8 -8
  148. package/lib/global/js/hooks/index.js +8 -0
  149. package/lib/global/js/hooks/useActiveElement.js +39 -0
  150. package/lib/global/js/package-settings.js +2 -1
  151. package/lib/global/js/utils/DisplayBox.js +46 -0
  152. package/lib/global/js/utils/Wrap.js +7 -5
  153. package/lib/global/js/utils/deepCloneObject.js +37 -0
  154. package/lib/global/js/utils/getScrollbarWidth.js +23 -0
  155. package/package.json +18 -16
  156. package/scss/components/{CancelableTextEdit → ActionBar}/_storybook-styles.scss +2 -2
  157. package/scss/components/ActionSet/_storybook-styles.scss +1 -3
  158. package/scss/components/AddSelect/_add-select.scss +77 -1
  159. package/scss/components/BreadcrumbWithOverflow/_storybook-styles.scss +8 -0
  160. package/scss/components/ButtonSetWithOverflow/_storybook-styles.scss +8 -0
  161. package/scss/components/DataSpreadsheet/_data-spreadsheet.scss +120 -0
  162. package/scss/components/{CancelableTextEdit → DataSpreadsheet}/_index.scss +2 -2
  163. package/scss/components/DataSpreadsheet/_storybook-styles.scss +6 -0
  164. package/scss/components/InlineEdit/_inline-edit.scss +22 -8
  165. package/scss/components/InlineEdit/_storybook-styles.scss +1 -0
  166. package/scss/components/TagSet/_storybook-styles.scss +8 -0
  167. package/scss/components/Tearsheet/_tearsheet.scss +1 -2
  168. package/scss/components/_index.scss +1 -1
  169. package/scss/global/styles/_display-box.scss +62 -0
  170. package/es/components/CancelableTextEdit/CancelableTextEdit.js +0 -245
  171. package/lib/components/CancelableTextEdit/CancelableTextEdit.js +0 -265
  172. package/lib/components/CancelableTextEdit/index.js +0 -13
  173. package/scss/components/CancelableTextEdit/_cancelable-text-edit.scss +0 -212
@@ -60,9 +60,4 @@ ModifiedTabLabelWithClose.propTypes = {
60
60
  * unsavedContent indicates tab contents have not been saved
61
61
  */
62
62
  unsavedContent: _propTypes.default.bool
63
- };
64
- ModifiedTabLabelWithClose.defaultProps = {
65
- unsavedContent: false,
66
- label: '',
67
- onClose: undefined
68
63
  };
@@ -31,14 +31,32 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
31
31
  // This source code is licensed under the Apache-2.0 license found in the
32
32
  // LICENSE file in the root directory of this source tree.
33
33
  //
34
- var componentName = 'ModifiedTabs';
34
+ var componentName = 'ModifiedTabs'; // Default values for props
35
+
36
+ var defaults = {
37
+ tabs: [{
38
+ id: 'tab-1',
39
+ label: 'Tab 1',
40
+ content: /*#__PURE__*/_react.default.createElement("div", null, "Iam am the content of tab 1."),
41
+ unsavedContent: false
42
+ }],
43
+ newTabLabel: 'New tab',
44
+ newTabContent: 'Your new tab will be here soon',
45
+ onNewTab: undefined,
46
+ onCloseTab: undefined
47
+ };
35
48
 
36
49
  var ModifiedTabs = function ModifiedTabs(_ref) {
37
- var tabs = _ref.tabs,
38
- newTabLabel = _ref.newTabLabel,
39
- newTabContent = _ref.newTabContent,
40
- onNewTab = _ref.onNewTab,
41
- onCloseTab = _ref.onCloseTab;
50
+ var _ref$tabs = _ref.tabs,
51
+ tabs = _ref$tabs === void 0 ? defaults.tabs : _ref$tabs,
52
+ _ref$newTabLabel = _ref.newTabLabel,
53
+ newTabLabel = _ref$newTabLabel === void 0 ? defaults.newTabLabel : _ref$newTabLabel,
54
+ _ref$newTabContent = _ref.newTabContent,
55
+ newTabContent = _ref$newTabContent === void 0 ? defaults.newTabContent : _ref$newTabContent,
56
+ _ref$onNewTab = _ref.onNewTab,
57
+ onNewTab = _ref$onNewTab === void 0 ? defaults.onNewTab : _ref$onNewTab,
58
+ _ref$onCloseTab = _ref.onCloseTab,
59
+ onCloseTab = _ref$onCloseTab === void 0 ? defaults.onCloseTab : _ref$onCloseTab;
42
60
 
43
61
  var handleNewTab = function handleNewTab() {
44
62
  if (onNewTab) {
@@ -122,16 +140,4 @@ ModifiedTabs.propTypes = {
122
140
  */
123
141
  tabs: _propTypes.default.array
124
142
  };
125
- ModifiedTabs.defaultProps = {
126
- tabs: [{
127
- id: 'tab-1',
128
- label: 'Tab 1',
129
- content: /*#__PURE__*/_react.default.createElement("div", null, "Iam am the content of tab 1."),
130
- unsavedContent: false
131
- }],
132
- newTabLabel: 'New tab',
133
- newTabContent: 'Your new tab will be here soon',
134
- onNewTab: undefined,
135
- onCloseTab: undefined
136
- };
137
143
  ModifiedTabs.displayName = componentName;
@@ -37,7 +37,7 @@ var _carbonComponentsReact = require("carbon-components-react");
37
37
 
38
38
  var _iconsReact = require("@carbon/icons-react");
39
39
 
40
- var _excluded = ["className", "data", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hoursAgoText", "hourAgoText", "minuteAgoText", "minutesAgoText", "monthsAgoText", "monthAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearsAgoText", "yearAgoText", "yesterdayAtText", "yesterdayLabel"];
40
+ var _excluded = ["className", "data", "daysAgoText", "dismissAllLabel", "dismissSingleNotificationIconDescription", "doNotDisturbDefaultToggled", "doNotDisturbLabel", "emptyStateLabel", "hourAgoText", "hoursAgoText", "minuteAgoText", "minutesAgoText", "monthAgoText", "monthsAgoText", "nowText", "onClickOutside", "onDismissAllNotifications", "onDismissSingleNotification", "onDoNotDisturbChange", "onSettingsClick", "onViewAllClick", "open", "previousLabel", "readLessLabel", "readMoreLabel", "secondsAgoText", "settingsIconDescription", "title", "todayLabel", "viewAllLabel", "yearAgoText", "yearsAgoText", "yesterdayAtText", "yesterdayLabel"];
41
41
 
42
42
  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); }
43
43
 
@@ -45,43 +45,122 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
45
45
 
46
46
  // The block part of our conventional BEM class names (blockClass__E--M).
47
47
  var componentName = 'NotificationsPanel';
48
- var blockClass = "".concat(_settings.pkg.prefix, "--notifications-panel");
48
+ var blockClass = "".concat(_settings.pkg.prefix, "--notifications-panel"); // Default values for props
49
+
50
+ var defaults = {
51
+ daysAgoText: function daysAgoText(value) {
52
+ return "".concat(value, " days ago");
53
+ },
54
+ dismissAllLabel: 'Dismiss all',
55
+ dismissSingleNotificationIconDescription: 'Dismiss',
56
+ doNotDisturbLabel: 'Do not disturb',
57
+ emptyStateLabel: 'You do not have any notifications',
58
+ hourAgoText: function hourAgoText(value) {
59
+ return "".concat(value, " hour ago");
60
+ },
61
+ hoursAgoText: function hoursAgoText(value) {
62
+ return "".concat(value, " hours ago");
63
+ },
64
+ minuteAgoText: function minuteAgoText(value) {
65
+ return "".concat(value, " minute ago");
66
+ },
67
+ minutesAgoText: function minutesAgoText(value) {
68
+ return "".concat(value, " minutes ago");
69
+ },
70
+ monthAgoText: function monthAgoText(value) {
71
+ return "".concat(value, " month ago");
72
+ },
73
+ monthsAgoText: function monthsAgoText(value) {
74
+ return "".concat(value, " months ago");
75
+ },
76
+ nowText: 'Now',
77
+ onDismissAllNotifications: function onDismissAllNotifications() {},
78
+ onDismissSingleNotification: function onDismissSingleNotification() {},
79
+ previousLabel: 'Previous',
80
+ readLessLabel: 'Read less',
81
+ readMoreLabel: 'Read more',
82
+ secondsAgoText: function secondsAgoText(value) {
83
+ return "".concat(value, " seconds ago");
84
+ },
85
+ settingsIconDescription: 'Settings',
86
+ title: 'Notifications',
87
+ todayLabel: 'Today',
88
+ viewAllLabel: function viewAllLabel(value) {
89
+ return "View all (".concat(value, ")");
90
+ },
91
+ yearAgoText: function yearAgoText(value) {
92
+ return "".concat(value, " year ago");
93
+ },
94
+ yearsAgoText: function yearsAgoText(value) {
95
+ return "".concat(value, " years ago");
96
+ },
97
+ yesterdayAtText: function yesterdayAtText(value) {
98
+ return "Yesterday at ".concat(value);
99
+ },
100
+ yesterdayLabel: 'Yesterday'
101
+ };
49
102
 
50
103
  var NotificationsPanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
51
104
  var className = _ref.className,
52
105
  data = _ref.data,
53
- daysAgoText = _ref.daysAgoText,
54
- dismissAllLabel = _ref.dismissAllLabel,
55
- dismissSingleNotificationIconDescription = _ref.dismissSingleNotificationIconDescription,
106
+ _ref$daysAgoText = _ref.daysAgoText,
107
+ daysAgoText = _ref$daysAgoText === void 0 ? defaults.daysAgoText : _ref$daysAgoText,
108
+ _ref$dismissAllLabel = _ref.dismissAllLabel,
109
+ dismissAllLabel = _ref$dismissAllLabel === void 0 ? defaults.dismissAllLabel : _ref$dismissAllLabel,
110
+ _ref$dismissSingleNot = _ref.dismissSingleNotificationIconDescription,
111
+ dismissSingleNotificationIconDescription = _ref$dismissSingleNot === void 0 ? defaults.dismissSingleNotificationIconDescription : _ref$dismissSingleNot,
56
112
  doNotDisturbDefaultToggled = _ref.doNotDisturbDefaultToggled,
57
- doNotDisturbLabel = _ref.doNotDisturbLabel,
58
- emptyStateLabel = _ref.emptyStateLabel,
59
- hoursAgoText = _ref.hoursAgoText,
60
- hourAgoText = _ref.hourAgoText,
61
- minuteAgoText = _ref.minuteAgoText,
62
- minutesAgoText = _ref.minutesAgoText,
63
- monthsAgoText = _ref.monthsAgoText,
64
- monthAgoText = _ref.monthAgoText,
65
- nowText = _ref.nowText,
113
+ _ref$doNotDisturbLabe = _ref.doNotDisturbLabel,
114
+ doNotDisturbLabel = _ref$doNotDisturbLabe === void 0 ? defaults.doNotDisturbLabel : _ref$doNotDisturbLabe,
115
+ _ref$emptyStateLabel = _ref.emptyStateLabel,
116
+ emptyStateLabel = _ref$emptyStateLabel === void 0 ? defaults.emptyStateLabel : _ref$emptyStateLabel,
117
+ _ref$hourAgoText = _ref.hourAgoText,
118
+ hourAgoText = _ref$hourAgoText === void 0 ? defaults.hourAgoText : _ref$hourAgoText,
119
+ _ref$hoursAgoText = _ref.hoursAgoText,
120
+ hoursAgoText = _ref$hoursAgoText === void 0 ? defaults.hoursAgoText : _ref$hoursAgoText,
121
+ _ref$minuteAgoText = _ref.minuteAgoText,
122
+ minuteAgoText = _ref$minuteAgoText === void 0 ? defaults.minuteAgoText : _ref$minuteAgoText,
123
+ _ref$minutesAgoText = _ref.minutesAgoText,
124
+ minutesAgoText = _ref$minutesAgoText === void 0 ? defaults.minutesAgoText : _ref$minutesAgoText,
125
+ _ref$monthAgoText = _ref.monthAgoText,
126
+ monthAgoText = _ref$monthAgoText === void 0 ? defaults.monthAgoText : _ref$monthAgoText,
127
+ _ref$monthsAgoText = _ref.monthsAgoText,
128
+ monthsAgoText = _ref$monthsAgoText === void 0 ? defaults.monthsAgoText : _ref$monthsAgoText,
129
+ _ref$nowText = _ref.nowText,
130
+ nowText = _ref$nowText === void 0 ? defaults.nowText : _ref$nowText,
66
131
  onClickOutside = _ref.onClickOutside,
67
- onDismissAllNotifications = _ref.onDismissAllNotifications,
68
- onDismissSingleNotification = _ref.onDismissSingleNotification,
132
+ _ref$onDismissAllNoti = _ref.onDismissAllNotifications,
133
+ onDismissAllNotifications = _ref$onDismissAllNoti === void 0 ? defaults.onDismissAllNotifications : _ref$onDismissAllNoti,
134
+ _ref$onDismissSingleN = _ref.onDismissSingleNotification,
135
+ onDismissSingleNotification = _ref$onDismissSingleN === void 0 ? defaults.onDismissSingleNotification : _ref$onDismissSingleN,
69
136
  onDoNotDisturbChange = _ref.onDoNotDisturbChange,
70
137
  onSettingsClick = _ref.onSettingsClick,
71
138
  onViewAllClick = _ref.onViewAllClick,
72
139
  open = _ref.open,
73
- previousLabel = _ref.previousLabel,
74
- readLessLabel = _ref.readLessLabel,
75
- readMoreLabel = _ref.readMoreLabel,
76
- secondsAgoText = _ref.secondsAgoText,
77
- settingsIconDescription = _ref.settingsIconDescription,
78
- title = _ref.title,
79
- todayLabel = _ref.todayLabel,
80
- viewAllLabel = _ref.viewAllLabel,
81
- yearsAgoText = _ref.yearsAgoText,
82
- yearAgoText = _ref.yearAgoText,
83
- yesterdayAtText = _ref.yesterdayAtText,
84
- yesterdayLabel = _ref.yesterdayLabel,
140
+ _ref$previousLabel = _ref.previousLabel,
141
+ previousLabel = _ref$previousLabel === void 0 ? defaults.previousLabel : _ref$previousLabel,
142
+ _ref$readLessLabel = _ref.readLessLabel,
143
+ readLessLabel = _ref$readLessLabel === void 0 ? defaults.readLessLabel : _ref$readLessLabel,
144
+ _ref$readMoreLabel = _ref.readMoreLabel,
145
+ readMoreLabel = _ref$readMoreLabel === void 0 ? defaults.readMoreLabel : _ref$readMoreLabel,
146
+ _ref$secondsAgoText = _ref.secondsAgoText,
147
+ secondsAgoText = _ref$secondsAgoText === void 0 ? defaults.secondsAgoText : _ref$secondsAgoText,
148
+ _ref$settingsIconDesc = _ref.settingsIconDescription,
149
+ settingsIconDescription = _ref$settingsIconDesc === void 0 ? defaults.settingsIconDescription : _ref$settingsIconDesc,
150
+ _ref$title = _ref.title,
151
+ title = _ref$title === void 0 ? defaults.title : _ref$title,
152
+ _ref$todayLabel = _ref.todayLabel,
153
+ todayLabel = _ref$todayLabel === void 0 ? defaults.todayLabel : _ref$todayLabel,
154
+ _ref$viewAllLabel = _ref.viewAllLabel,
155
+ viewAllLabel = _ref$viewAllLabel === void 0 ? defaults.viewAllLabel : _ref$viewAllLabel,
156
+ _ref$yearAgoText = _ref.yearAgoText,
157
+ yearAgoText = _ref$yearAgoText === void 0 ? defaults.yearAgoText : _ref$yearAgoText,
158
+ _ref$yearsAgoText = _ref.yearsAgoText,
159
+ yearsAgoText = _ref$yearsAgoText === void 0 ? defaults.yearsAgoText : _ref$yearsAgoText,
160
+ _ref$yesterdayAtText = _ref.yesterdayAtText,
161
+ yesterdayAtText = _ref$yesterdayAtText === void 0 ? defaults.yesterdayAtText : _ref$yesterdayAtText,
162
+ _ref$yesterdayLabel = _ref.yesterdayLabel,
163
+ yesterdayLabel = _ref$yesterdayLabel === void 0 ? defaults.yesterdayLabel : _ref$yesterdayLabel,
85
164
  rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
86
165
  var notificationPanelRef = (0, _react.useRef)();
87
166
 
@@ -436,12 +515,12 @@ NotificationsPanel.propTypes = {
436
515
  /**
437
516
  * Function that will dismiss all notifications
438
517
  */
439
- onDismissAllNotifications: _propTypes.default.func.isRequired,
518
+ onDismissAllNotifications: _propTypes.default.func,
440
519
 
441
520
  /**
442
521
  * Function that will dismiss a single notification
443
522
  */
444
- onDismissSingleNotification: _propTypes.default.func.isRequired,
523
+ onDismissSingleNotification: _propTypes.default.func,
445
524
 
446
525
  /**
447
526
  * Function that returns the current selected value of the disable notification toggle
@@ -522,60 +601,4 @@ NotificationsPanel.propTypes = {
522
601
  * Sets the yesterday label text
523
602
  */
524
603
  yesterdayLabel: _propTypes.default.string
525
- }; // Default values for component props. Default values are not required for
526
- // props that are required, nor for props where the component can apply
527
- // 'undefined' values reasonably. Default values should be provided when the
528
- // component needs to make a choice or assumption when a prop is not supplied.
529
-
530
- NotificationsPanel.defaultProps = {
531
- daysAgoText: function daysAgoText(value) {
532
- return "".concat(value, " days ago");
533
- },
534
- dismissAllLabel: 'Dismiss all',
535
- dismissSingleNotificationIconDescription: 'Dismiss',
536
- doNotDisturbLabel: 'Do not disturb',
537
- emptyStateLabel: 'You do not have any notifications',
538
- hourAgoText: function hourAgoText(value) {
539
- return "".concat(value, " hour ago");
540
- },
541
- hoursAgoText: function hoursAgoText(value) {
542
- return "".concat(value, " hours ago");
543
- },
544
- minuteAgoText: function minuteAgoText(value) {
545
- return "".concat(value, " minute ago");
546
- },
547
- minutesAgoText: function minutesAgoText(value) {
548
- return "".concat(value, " minutes ago");
549
- },
550
- monthAgoText: function monthAgoText(value) {
551
- return "".concat(value, " month ago");
552
- },
553
- monthsAgoText: function monthsAgoText(value) {
554
- return "".concat(value, " months ago");
555
- },
556
- nowText: 'Now',
557
- onDismissAllNotifications: function onDismissAllNotifications() {},
558
- onDismissSingleNotification: function onDismissSingleNotification() {},
559
- previousLabel: 'Previous',
560
- readLessLabel: 'Read less',
561
- readMoreLabel: 'Read more',
562
- secondsAgoText: function secondsAgoText(value) {
563
- return "".concat(value, " seconds ago");
564
- },
565
- settingsIconDescription: 'Settings',
566
- title: 'Notifications',
567
- todayLabel: 'Today',
568
- viewAllLabel: function viewAllLabel(value) {
569
- return "View all (".concat(value, ")");
570
- },
571
- yearsAgoText: function yearsAgoText(value) {
572
- return "".concat(value, " years ago");
573
- },
574
- yearAgoText: function yearAgoText(value) {
575
- return "".concat(value, " year ago");
576
- },
577
- yesterdayLabel: 'Yesterday',
578
- yesterdayAtText: function yesterdayAtText(value) {
579
- return "Yesterday at ".concat(value);
580
- }
581
604
  };
@@ -44,7 +44,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
44
44
  // The block part of our conventional BEM class names (blockClass__E--M).
45
45
  var blockClass = "".concat(_settings.pkg.prefix, "--options-tile");
46
46
  var componentName = 'OptionsTile'; // NOTE: the component SCSS is not imported here: it is rolled up separately.
47
+ // Default values for props
47
48
 
49
+ var defaults = {
50
+ size: 'xl'
51
+ };
48
52
  /**
49
53
  * TODO: A description of the component.
50
54
  */
@@ -61,7 +65,8 @@ var OptionsTile = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
61
65
  lockedText = _ref.lockedText,
62
66
  onToggle = _ref.onToggle,
63
67
  open = _ref.open,
64
- size = _ref.size,
68
+ _ref$size = _ref.size,
69
+ size = _ref$size === void 0 ? defaults.size : _ref$size,
65
70
  summary = _ref.summary,
66
71
  warn = _ref.warn,
67
72
  warnText = _ref.warnText,
@@ -337,12 +342,4 @@ OptionsTile.propTypes = {
337
342
  * Provide a text explaining why the OptionsTile is in warning state.
338
343
  */
339
344
  warnText: _propTypes.default.string
340
- }; // Default values for component props. Default values are not required for
341
- // props that are required, nor for props where the component can apply
342
- // 'undefined' values reasonably. Default values should be provided when the
343
- // component needs to make a choice or assumption when a prop is not supplied.
344
-
345
- OptionsTile.defaultProps = {
346
- open: false,
347
- size: 'xl'
348
345
  };
@@ -62,6 +62,11 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
62
62
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
63
63
 
64
64
  var componentName = 'PageHeader';
65
+ // Default values for props
66
+ var defaults = {
67
+ fullWidthGrid: false,
68
+ narrowGrid: false
69
+ };
65
70
 
66
71
  var PageHeader = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
67
72
  var _withoutBackground, _ref6, _cx2, _ref7, _cx4, _cx7;
@@ -82,9 +87,11 @@ var PageHeader = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
82
87
  collapseTitle = _ref.collapseTitle,
83
88
  disableBreadcrumbScroll = _ref.disableBreadcrumbScroll,
84
89
  expandHeaderIconDescription = _ref.expandHeaderIconDescription,
85
- fullWidthGrid = _ref.fullWidthGrid,
90
+ _ref$fullWidthGrid = _ref.fullWidthGrid,
91
+ fullWidthGrid = _ref$fullWidthGrid === void 0 ? defaults.fullWidthGrid : _ref$fullWidthGrid,
86
92
  hasCollapseHeaderToggle = _ref.hasCollapseHeaderToggle,
87
- narrowGrid = _ref.narrowGrid,
93
+ _ref$narrowGrid = _ref.narrowGrid,
94
+ narrowGrid = _ref$narrowGrid === void 0 ? defaults.narrowGrid : _ref$narrowGrid,
88
95
  navigation = _ref.navigation,
89
96
  pageActions = _ref.pageActions,
90
97
  pageActionsOverflowLabel = _ref.pageActionsOverflowLabel,
@@ -839,8 +846,4 @@ PageHeader.propTypes = _objectSpread({
839
846
  */
840
847
  withoutBackground: _propTypes.default.bool
841
848
  }, deprecatedProps);
842
- PageHeader.defaultProps = {
843
- fullWidthGrid: false,
844
- narrowGrid: false
845
- };
846
849
  PageHeader.displayName = componentName;
@@ -11,6 +11,10 @@ exports.ProductiveCard = void 0;
11
11
 
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
 
14
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
+
16
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
+
14
18
  var _react = _interopRequireWildcard(require("react"));
15
19
 
16
20
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -23,21 +27,30 @@ var _propsHelper = require("../../global/js/utils/props-helper");
23
27
 
24
28
  var _settings = require("../../settings");
25
29
 
30
+ var _excluded = ["actionsPlacement"];
31
+
26
32
  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); }
27
33
 
28
34
  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; }
29
35
 
30
- //
31
- // Copyright IBM Corp. 2020, 2021
32
- //
33
- // This source code is licensed under the Apache-2.0 license found in the
34
- // LICENSE file in the root directory of this source tree.
35
- //
36
- var componentName = 'ProductiveCard';
37
- var ProductiveCard = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
38
- var validProps = (0, _propsHelper.prepareProps)(props, ['media', 'mediaPosition', 'onSecondaryButtonClick', 'pictogram', 'primaryButtonClick', 'productive', 'secondaryButtonKind', 'secondaryButtonText']);
39
- return /*#__PURE__*/_react.default.createElement(_Card.Card, (0, _extends2.default)({}, validProps, {
40
- ref: ref,
36
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
37
+
38
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
39
+
40
+ var componentName = 'ProductiveCard'; // Default values for props
41
+
42
+ var defaults = {
43
+ actionsPlacement: 'top'
44
+ };
45
+ var ProductiveCard = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
46
+ var _ref$actionsPlacement = _ref.actionsPlacement,
47
+ actionsPlacement = _ref$actionsPlacement === void 0 ? defaults.actionsPlacement : _ref$actionsPlacement,
48
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
49
+ var validProps = (0, _propsHelper.prepareProps)(rest, ['media', 'mediaPosition', 'onSecondaryButtonClick', 'pictogram', 'primaryButtonClick', 'productive', 'secondaryButtonKind', 'secondaryButtonText']);
50
+ return /*#__PURE__*/_react.default.createElement(_Card.Card, (0, _extends2.default)({}, _objectSpread(_objectSpread({}, validProps), {}, {
51
+ actionsPlacement: actionsPlacement,
52
+ ref: ref
53
+ }), {
41
54
  productive: true
42
55
  }, (0, _devtools.getDevtoolsProps)(componentName)));
43
56
  }); // Return a placeholder if not released and not enabled by feature flag
@@ -132,11 +145,4 @@ ProductiveCard.propTypes = {
132
145
  */
133
146
  titleSize: _propTypes.default.oneOf(['default', 'large'])
134
147
  };
135
- ProductiveCard.defaultProps = {
136
- actionIcons: [],
137
- actionsPlacement: 'top',
138
- clickZone: 'one',
139
- overflowActions: [],
140
- titleSize: 'default'
141
- };
142
148
  ProductiveCard.displayName = componentName;
@@ -206,7 +206,4 @@ RemoveModal.propTypes = {
206
206
  */
207
207
  title: _propTypes.default.string.isRequired
208
208
  };
209
- RemoveModal.defaultProps = {
210
- textConfirmation: false
211
- };
212
209
  RemoveModal.displayName = componentName;
@@ -58,7 +58,16 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
58
58
 
59
59
  var blockClass = "".concat(_settings.pkg.prefix, "--side-panel");
60
60
  var componentName = 'SidePanel'; // NOTE: the component SCSS is not imported here: it is rolled up separately.
61
+ // Default values for props
61
62
 
63
+ var defaults = {
64
+ animateTitle: true,
65
+ closeIconDescription: 'Close',
66
+ currentStep: 0,
67
+ navigationBackIconDescription: 'Back',
68
+ placement: 'right',
69
+ size: 'md'
70
+ };
62
71
  /**
63
72
  * Side panels keep users in-context of a page while performing tasks like navigating, editing, viewing details, or configuring something new.
64
73
  */
@@ -68,24 +77,30 @@ var SidePanel = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
68
77
 
69
78
  var actionToolbarButtons = _ref.actionToolbarButtons,
70
79
  actions = _ref.actions,
71
- animateTitle = _ref.animateTitle,
80
+ _ref$animateTitle = _ref.animateTitle,
81
+ animateTitle = _ref$animateTitle === void 0 ? defaults.animateTitle : _ref$animateTitle,
72
82
  children = _ref.children,
73
83
  className = _ref.className,
74
- closeIconDescription = _ref.closeIconDescription,
84
+ _ref$closeIconDescrip = _ref.closeIconDescription,
85
+ closeIconDescription = _ref$closeIconDescrip === void 0 ? defaults.closeIconDescription : _ref$closeIconDescrip,
75
86
  condensedActions = _ref.condensedActions,
76
- currentStep = _ref.currentStep,
87
+ _ref$currentStep = _ref.currentStep,
88
+ currentStep = _ref$currentStep === void 0 ? defaults.currentStep : _ref$currentStep,
77
89
  includeOverlay = _ref.includeOverlay,
78
90
  labelText = _ref.labelText,
79
- navigationBackIconDescription = _ref.navigationBackIconDescription,
91
+ _ref$navigationBackIc = _ref.navigationBackIconDescription,
92
+ navigationBackIconDescription = _ref$navigationBackIc === void 0 ? defaults.navigationBackIconDescription : _ref$navigationBackIc,
80
93
  onNavigationBack = _ref.onNavigationBack,
81
94
  onRequestClose = _ref.onRequestClose,
82
95
  onUnmount = _ref.onUnmount,
83
96
  open = _ref.open,
84
- placement = _ref.placement,
97
+ _ref$placement = _ref.placement,
98
+ placement = _ref$placement === void 0 ? defaults.placement : _ref$placement,
85
99
  preventCloseOnClickOutside = _ref.preventCloseOnClickOutside,
86
100
  selectorPageContent = _ref.selectorPageContent,
87
101
  selectorPrimaryFocus = _ref.selectorPrimaryFocus,
88
- size = _ref.size,
102
+ _ref$size = _ref.size,
103
+ size = _ref$size === void 0 ? defaults.size : _ref$size,
89
104
  slideIn = _ref.slideIn,
90
105
  subtitle = _ref.subtitle,
91
106
  title = _ref.title,
@@ -575,7 +590,7 @@ SidePanel.propTypes = {
575
590
  /**
576
591
  * Sets the close button icon description
577
592
  */
578
- closeIconDescription: _propTypes.default.string.isRequired,
593
+ closeIconDescription: _propTypes.default.string,
579
594
 
580
595
  /**
581
596
  * Determines whether the side panel should render the condensed version (affects action buttons primarily)
@@ -672,14 +687,4 @@ SidePanel.propTypes = {
672
687
  return labelText;
673
688
  })
674
689
  };
675
- SidePanel.defaultProps = {
676
- animateTitle: true,
677
- placement: 'right',
678
- size: 'md',
679
- slideIn: false,
680
- currentStep: 0,
681
- navigationBackIconDescription: 'Back',
682
- closeIconDescription: 'Close',
683
- preventCloseOnClickOutside: false
684
- };
685
690
  SidePanel.displayName = componentName;
@@ -51,15 +51,24 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
51
51
 
52
52
  var componentName = 'TagSet';
53
53
  var blockClass = "".concat(_settings.pkg.prefix, "--tag-set");
54
- var allTagsModalSearchThreshold = 10;
54
+ var allTagsModalSearchThreshold = 10; // Default values for props
55
+
56
+ var defaults = {
57
+ align: 'start',
58
+ overflowAlign: 'center',
59
+ overflowDirection: 'bottom'
60
+ };
55
61
 
56
62
  var TagSet = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
57
- var align = _ref.align,
63
+ var _ref$align = _ref.align,
64
+ align = _ref$align === void 0 ? defaults.align : _ref$align,
58
65
  className = _ref.className,
59
66
  maxVisible = _ref.maxVisible,
60
- overflowAlign = _ref.overflowAlign,
67
+ _ref$overflowAlign = _ref.overflowAlign,
68
+ overflowAlign = _ref$overflowAlign === void 0 ? defaults.overflowAlign : _ref$overflowAlign,
61
69
  overflowClassName = _ref.overflowClassName,
62
- overflowDirection = _ref.overflowDirection,
70
+ _ref$overflowDirectio = _ref.overflowDirection,
71
+ overflowDirection = _ref$overflowDirectio === void 0 ? defaults.overflowDirection : _ref$overflowDirectio,
63
72
  allTagsModalTitle = _ref.allTagsModalTitle,
64
73
  allTagsModalSearchLabel = _ref.allTagsModalSearchLabel,
65
74
  allTagsModalSearchPlaceholderText = _ref.allTagsModalSearchPlaceholderText,
@@ -345,11 +354,6 @@ TagSet.propTypes = {
345
354
  type: _propTypes.default.oneOf(tagTypes)
346
355
  })))
347
356
  };
348
- TagSet.defaultProps = {
349
- align: 'start',
350
- overflowAlign: 'center',
351
- overflowDirection: 'bottom'
352
- };
353
357
  TagSet.displayName = componentName;
354
358
  var _default = TagSet;
355
359
  exports.default = _default;
@@ -13,10 +13,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
15
15
 
16
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
17
-
18
16
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
19
17
 
18
+ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
19
+
20
20
  var _react = _interopRequireWildcard(require("react"));
21
21
 
22
22
  var _propTypes = _interopRequireDefault(require("prop-types"));
@@ -29,7 +29,8 @@ var _settings = require("../../settings");
29
29
 
30
30
  var _propsHelper = require("../../global/js/utils/props-helper");
31
31
 
32
- var _excluded = ["label"];
32
+ var _excluded = ["allTags", "className", "title", "onClose", "open", "searchLabel", "searchPlaceholder"],
33
+ _excluded2 = ["label"];
33
34
 
34
35
  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); }
35
36
 
@@ -40,7 +41,12 @@ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (O
40
41
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
41
42
 
42
43
  var componentName = 'TagSetModal';
43
- var blockClass = "".concat(_settings.pkg.prefix, "--tag-set-modal");
44
+ var blockClass = "".concat(_settings.pkg.prefix, "--tag-set-modal"); // Default values for props
45
+
46
+ var defaults = {
47
+ // marked as required by TagSet if needed, default used to satisfy <Search /> component
48
+ searchLabel: ''
49
+ };
44
50
 
45
51
  var TagSetModal = function TagSetModal(_ref) {
46
52
  var allTags = _ref.allTags,
@@ -48,8 +54,10 @@ var TagSetModal = function TagSetModal(_ref) {
48
54
  title = _ref.title,
49
55
  onClose = _ref.onClose,
50
56
  open = _ref.open,
51
- searchLabel = _ref.searchLabel,
52
- searchPlaceholder = _ref.searchPlaceholder;
57
+ _ref$searchLabel = _ref.searchLabel,
58
+ searchLabel = _ref$searchLabel === void 0 ? defaults.searchLabel : _ref$searchLabel,
59
+ searchPlaceholder = _ref.searchPlaceholder,
60
+ rest = (0, _objectWithoutProperties2.default)(_ref, _excluded);
53
61
 
54
62
  var _useState = (0, _react.useState)([]),
55
63
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
@@ -89,13 +97,13 @@ var TagSetModal = function TagSetModal(_ref) {
89
97
  setSearch(ev.target.value || '');
90
98
  };
91
99
 
92
- return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.ComposedModal, {
100
+ return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.ComposedModal, (0, _extends2.default)({}, rest, {
93
101
  containerClassName: "".concat(blockClass, "__container"),
94
102
  className: (0, _classnames.default)(className, "".concat(blockClass)),
95
103
  size: "sm",
96
104
  open: open,
97
105
  onClose: onClose
98
- }, /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.ModalHeader, {
106
+ }), /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.ModalHeader, {
99
107
  title: title,
100
108
  className: "".concat(blockClass, "__header")
101
109
  }, /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Search, {
@@ -110,7 +118,7 @@ var TagSetModal = function TagSetModal(_ref) {
110
118
  hasForm: true
111
119
  }, filteredModalTags.map(function (_ref2, index) {
112
120
  var label = _ref2.label,
113
- other = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
121
+ other = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
114
122
  return /*#__PURE__*/_react.default.createElement(_carbonComponentsReact.Tag, (0, _extends2.default)({}, other, {
115
123
  filter: false,
116
124
  key: "all-tags-".concat(index)
@@ -132,8 +140,4 @@ TagSetModal.propTypes = {
132
140
  searchPlaceholder: _propTypes.default.string,
133
141
  title: _propTypes.default.string
134
142
  };
135
- TagSetModal.defaultProps = {
136
- // marked as required by TagSet if needed, default used to satisfy <Search /> component
137
- searchLabel: ''
138
- };
139
143
  TagSetModal.displayName = componentName;