@carbon/ibm-products 2.33.0 → 2.35.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (262) hide show
  1. package/css/index-full-carbon.css +31990 -32061
  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 +636 -24096
  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 +2342 -17830
  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/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  31. package/es/components/CreateSidePanel/CreateSidePanel.js +5 -2
  32. package/es/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  33. package/es/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  34. package/es/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  35. package/es/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  36. package/es/components/DataSpreadsheet/utils/commonEventHandlers.js +304 -0
  37. package/es/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  38. package/es/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  39. package/es/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  40. package/es/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  41. package/es/components/Datagrid/Datagrid/DatagridVirtualBody.js +6 -2
  42. package/es/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  43. package/es/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  44. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  45. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  46. package/es/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  47. package/es/components/Datagrid/useEditableCell.js +15 -0
  48. package/es/components/DelimitedList/DelimitedList.d.ts +27 -2
  49. package/es/components/DelimitedList/DelimitedList.js +0 -1
  50. package/es/components/EditInPlace/EditInPlace.d.ts +97 -5
  51. package/es/components/EditInPlace/EditInPlace.js +10 -6
  52. package/es/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  53. package/es/components/EditSidePanel/EditSidePanel.js +8 -10
  54. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  55. package/es/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  56. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  57. package/es/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  58. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  59. package/es/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  60. package/es/components/ExportModal/ExportModal.d.ts +110 -2
  61. package/es/components/ExportModal/ExportModal.js +10 -4
  62. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  63. package/es/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +83 -0
  64. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  65. package/es/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +94 -0
  66. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  67. package/es/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
  68. package/es/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  69. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  70. package/es/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +157 -0
  71. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  72. package/es/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +72 -0
  73. package/es/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  74. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  75. package/es/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +92 -0
  76. package/es/components/FilterPanel/index.d.ts +5 -0
  77. package/es/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  78. package/es/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  79. package/es/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  80. package/es/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  81. package/es/components/ImportModal/ImportModal.d.ts +136 -2
  82. package/es/components/ImportModal/ImportModal.js +3 -2
  83. package/es/components/InlineTip/InlineTip.d.ts +90 -2
  84. package/es/components/InlineTip/InlineTip.js +3 -2
  85. package/es/components/Nav/Nav.js +1 -1
  86. package/es/components/Nav/NavList.js +7 -7
  87. package/es/components/NotificationsPanel/NotificationsPanel.js +1 -1
  88. package/es/components/OptionsTile/OptionsTile.d.ts +77 -3
  89. package/es/components/OptionsTile/OptionsTile.js +9 -20
  90. package/es/components/PageHeader/PageHeader.js +3 -3
  91. package/es/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  92. package/es/components/PageHeader/PageHeaderUtils.js +4 -3
  93. package/es/components/RemoveModal/RemoveModal.d.ts +81 -7
  94. package/es/components/RemoveModal/RemoveModal.js +1 -0
  95. package/es/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  96. package/es/components/ScrollGradient/ScrollGradient.js +156 -0
  97. package/es/components/ScrollGradient/constants.d.ts +15 -0
  98. package/es/components/ScrollGradient/constants.js +121 -0
  99. package/es/components/ScrollGradient/index.d.ts +1 -0
  100. package/es/components/SidePanel/SidePanel.d.ts +144 -2
  101. package/es/components/SidePanel/SidePanel.js +100 -75
  102. package/es/components/StatusIcon/StatusIcon.d.ts +34 -2
  103. package/es/components/StatusIcon/StatusIcon.js +97 -95
  104. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  105. package/es/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  106. package/es/components/TagOverflow/TagOverflow.d.ts +5 -0
  107. package/es/components/TagOverflow/TagOverflow.js +209 -0
  108. package/es/components/TagOverflow/constants.d.ts +14 -0
  109. package/es/components/TagOverflow/constants.js +30 -0
  110. package/es/components/TagOverflow/index.d.ts +1 -0
  111. package/es/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  112. package/es/components/Tearsheet/TearsheetNarrow.js +6 -1
  113. package/es/components/Toolbar/Toolbar.d.ts +23 -5
  114. package/es/components/Toolbar/Toolbar.js +30 -26
  115. package/es/components/TruncatedList/TruncatedList.js +5 -3
  116. package/es/components/UserAvatar/UserAvatar.js +7 -4
  117. package/es/components/index.d.ts +5 -2
  118. package/es/global/js/package-settings.d.ts +8 -0
  119. package/es/global/js/package-settings.js +8 -0
  120. package/es/index.js +9 -0
  121. package/es/settings.d.ts +8 -0
  122. package/lib/components/ActionSet/ActionSet.d.ts +38 -2
  123. package/lib/components/ActionSet/ActionSet.js +3 -5
  124. package/lib/components/CoachmarkFixed/CoachmarkFixed.js +1 -1
  125. package/lib/components/ConditionBuilder/ConditionBuilder.d.ts +5 -0
  126. package/lib/components/ConditionBuilder/ConditionBuilder.js +132 -0
  127. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.d.ts +10 -0
  128. package/lib/components/ConditionBuilder/ConditionBuilderContent/ConditionBuilderContent.js +100 -0
  129. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.d.ts +38 -0
  130. package/lib/components/ConditionBuilder/ConditionBuilderContext/DataTreeContext.js +98 -0
  131. package/lib/components/ConditionBuilder/assets/sampleInput.d.ts +58 -0
  132. package/lib/components/ConditionBuilder/index.d.ts +1 -0
  133. package/lib/components/CreateFullPage/CreateFullPage.js +2 -18
  134. package/lib/components/CreateFullPage/CreateFullPageStep.js +20 -5
  135. package/lib/components/CreateSidePanel/CreateSidePanel.d.ts +81 -2
  136. package/lib/components/CreateSidePanel/CreateSidePanel.js +5 -2
  137. package/lib/components/CreateTearsheetNarrow/CreateTearsheetNarrow.d.ts +82 -2
  138. package/lib/components/DataSpreadsheet/DataSpreadsheet.js +5 -117
  139. package/lib/components/DataSpreadsheet/DataSpreadsheetBody.js +12 -111
  140. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.d.ts +4 -0
  141. package/lib/components/DataSpreadsheet/utils/commonEventHandlers.js +311 -0
  142. package/lib/components/Datagrid/Datagrid/DatagridContent.js +2 -1
  143. package/lib/components/Datagrid/Datagrid/DatagridEmptyBody.js +4 -1
  144. package/lib/components/Datagrid/Datagrid/DatagridRefBody.js +3 -1
  145. package/lib/components/Datagrid/Datagrid/DatagridSimpleBody.js +4 -1
  146. package/lib/components/Datagrid/Datagrid/DatagridVirtualBody.js +5 -1
  147. package/lib/components/Datagrid/Datagrid/addons/CustomizeColumns/Columns.d.ts +1 -1
  148. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/InlineEditCell/InlineEditCell.js +4 -0
  149. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  150. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  151. package/lib/components/Datagrid/Datagrid/addons/stateReducer.js +2 -1
  152. package/lib/components/Datagrid/useEditableCell.js +19 -0
  153. package/lib/components/DelimitedList/DelimitedList.d.ts +27 -2
  154. package/lib/components/DelimitedList/DelimitedList.js +0 -1
  155. package/lib/components/EditInPlace/EditInPlace.d.ts +97 -5
  156. package/lib/components/EditInPlace/EditInPlace.js +10 -6
  157. package/lib/components/EditSidePanel/EditSidePanel.d.ts +92 -2
  158. package/lib/components/EditSidePanel/EditSidePanel.js +8 -10
  159. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.d.ts +61 -2
  160. package/lib/components/EmptyStates/ErrorEmptyState/ErrorEmptyState.js +1 -3
  161. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.d.ts +61 -2
  162. package/lib/components/EmptyStates/NoDataEmptyState/NoDataEmptyState.js +1 -2
  163. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.d.ts +61 -2
  164. package/lib/components/EmptyStates/NotFoundEmptyState/NotFoundEmptyState.js +1 -3
  165. package/lib/components/ExportModal/ExportModal.d.ts +110 -2
  166. package/lib/components/ExportModal/ExportModal.js +10 -4
  167. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.d.ts +5 -0
  168. package/lib/components/FilterPanel/FilterPanelAccordion/FilterPanelAccordion.js +90 -0
  169. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.d.ts +5 -0
  170. package/lib/components/FilterPanel/FilterPanelAccordionItem/FilterPanelAccordionItem.js +101 -0
  171. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.d.ts +5 -0
  172. package/lib/components/FilterPanel/FilterPanelCheckbox/FilterPanelCheckbox.js +8 -10
  173. package/lib/components/FilterPanel/FilterPanelCheckbox/index.d.ts +1 -0
  174. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.d.ts +10 -0
  175. package/lib/components/FilterPanel/FilterPanelCheckboxWithOverflow/FilterPanelCheckboxWithOverflow.js +164 -0
  176. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.d.ts +5 -0
  177. package/lib/components/FilterPanel/FilterPanelGroup/FilterPanelGroup.js +79 -0
  178. package/lib/components/FilterPanel/FilterPanelLabel/FilterPanelLabel.js +2 -2
  179. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.d.ts +5 -0
  180. package/lib/components/FilterPanel/FilterPanelSearch/FilterPanelSearch.js +99 -0
  181. package/lib/components/FilterPanel/index.d.ts +5 -0
  182. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.d.ts +40 -2
  183. package/lib/components/HTTPErrors/HTTPError403/HTTPError403.js +1 -1
  184. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.d.ts +40 -2
  185. package/lib/components/HTTPErrors/HTTPError404/HTTPError404.js +1 -1
  186. package/lib/components/ImportModal/ImportModal.d.ts +136 -2
  187. package/lib/components/ImportModal/ImportModal.js +3 -2
  188. package/lib/components/InlineTip/InlineTip.d.ts +90 -2
  189. package/lib/components/InlineTip/InlineTip.js +3 -2
  190. package/lib/components/Nav/Nav.js +1 -1
  191. package/lib/components/Nav/NavList.js +7 -7
  192. package/lib/components/NotificationsPanel/NotificationsPanel.js +1 -1
  193. package/lib/components/OptionsTile/OptionsTile.d.ts +77 -3
  194. package/lib/components/OptionsTile/OptionsTile.js +9 -20
  195. package/lib/components/PageHeader/PageHeader.js +3 -3
  196. package/lib/components/PageHeader/PageHeaderUtils.d.ts +1 -1
  197. package/lib/components/PageHeader/PageHeaderUtils.js +4 -3
  198. package/lib/components/RemoveModal/RemoveModal.d.ts +81 -7
  199. package/lib/components/RemoveModal/RemoveModal.js +1 -0
  200. package/lib/components/ScrollGradient/ScrollGradient.d.ts +5 -0
  201. package/lib/components/ScrollGradient/ScrollGradient.js +163 -0
  202. package/lib/components/ScrollGradient/constants.d.ts +15 -0
  203. package/lib/components/ScrollGradient/constants.js +128 -0
  204. package/lib/components/ScrollGradient/index.d.ts +1 -0
  205. package/lib/components/SidePanel/SidePanel.d.ts +144 -2
  206. package/lib/components/SidePanel/SidePanel.js +100 -75
  207. package/lib/components/StatusIcon/StatusIcon.d.ts +34 -2
  208. package/lib/components/StatusIcon/StatusIcon.js +97 -95
  209. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.d.ts +23 -2
  210. package/lib/components/SteppedAnimatedMedia/SteppedAnimatedMedia.js +6 -5
  211. package/lib/components/TagOverflow/TagOverflow.d.ts +5 -0
  212. package/lib/components/TagOverflow/TagOverflow.js +216 -0
  213. package/lib/components/TagOverflow/constants.d.ts +14 -0
  214. package/lib/components/TagOverflow/constants.js +34 -0
  215. package/lib/components/TagOverflow/index.d.ts +1 -0
  216. package/lib/components/Tearsheet/TearsheetNarrow.d.ts +105 -6
  217. package/lib/components/Tearsheet/TearsheetNarrow.js +6 -1
  218. package/lib/components/Toolbar/Toolbar.d.ts +23 -5
  219. package/lib/components/Toolbar/Toolbar.js +30 -26
  220. package/lib/components/TruncatedList/TruncatedList.js +5 -3
  221. package/lib/components/UserAvatar/UserAvatar.js +7 -4
  222. package/lib/components/index.d.ts +5 -2
  223. package/lib/global/js/package-settings.d.ts +8 -0
  224. package/lib/global/js/package-settings.js +8 -0
  225. package/lib/index.js +42 -0
  226. package/lib/settings.d.ts +8 -0
  227. package/package.json +3 -3
  228. package/scss/components/Coachmark/_coachmark-dragbar.scss +0 -1
  229. package/scss/components/Coachmark/_coachmark-tagline.scss +2 -2
  230. package/scss/components/ConditionBuilder/_carbon-imports.scss +9 -0
  231. package/scss/components/ConditionBuilder/_condition-builder.scss +25 -0
  232. package/scss/components/ConditionBuilder/_index-with-carbon.scss +9 -0
  233. package/scss/components/ConditionBuilder/_index.scss +8 -0
  234. package/scss/components/CreateFullPage/_create-full-page.scss +10 -10
  235. package/scss/components/Datagrid/styles/_useNestedRows.scss +5 -1
  236. package/scss/components/FilterPanel/_carbon-imports.scss +5 -0
  237. package/scss/components/FilterPanel/_filter-panel-accordion-item.scss +54 -0
  238. package/scss/components/FilterPanel/_filter-panel-accordion.scss +6 -0
  239. package/scss/components/FilterPanel/_filter-panel-checkbox-with-overflow.scss +60 -0
  240. package/scss/components/FilterPanel/_filter-panel-checkbox.scss +24 -3
  241. package/scss/components/FilterPanel/_filter-panel-group.scss +39 -0
  242. package/scss/components/FilterPanel/_filter-panel-label.scss +0 -8
  243. package/scss/components/FilterPanel/_filter-panel-search.scss +38 -0
  244. package/scss/components/FilterPanel/_filter-panel.scss +2 -0
  245. package/scss/components/FilterPanel/_index-with-carbon.scss +5 -0
  246. package/scss/components/FilterPanel/_index.scss +5 -0
  247. package/scss/components/Guidebanner/_guidebanner.scss +1 -1
  248. package/scss/components/InlineTip/_inline-tip.scss +1 -1
  249. package/scss/components/ProductiveCard/_productive-card.scss +13 -0
  250. package/scss/components/ScrollGradient/_carbon-imports.scss +9 -0
  251. package/scss/components/ScrollGradient/_index-with-carbon.scss +9 -0
  252. package/scss/components/ScrollGradient/_index.scss +8 -0
  253. package/scss/components/ScrollGradient/_scroll-gradient.scss +102 -0
  254. package/scss/components/SidePanel/_side-panel.scss +9 -9
  255. package/scss/components/TagOverflow/_carbon-imports.scss +9 -0
  256. package/scss/components/TagOverflow/_index-with-carbon.scss +9 -0
  257. package/scss/components/TagOverflow/_index.scss +8 -0
  258. package/scss/components/TagOverflow/_tag-overflow.scss +55 -0
  259. package/scss/components/Tearsheet/_tearsheet.scss +10 -0
  260. package/scss/components/UserAvatar/_user-avatar.scss +38 -4
  261. package/scss/components/_index-with-carbon.scss +3 -0
  262. package/scss/components/_index.scss +3 -0
@@ -35,7 +35,6 @@ var defaults = {
35
35
  preformattedExtensions: Object.freeze([]),
36
36
  validExtensions: Object.freeze([])
37
37
  };
38
-
39
38
  /**
40
39
  * Modal dialog version of the export pattern
41
40
  */
@@ -48,7 +47,7 @@ exports.ExportModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
48
47
  hidePasswordLabel = _ref.hidePasswordLabel,
49
48
  inputLabel = _ref.inputLabel,
50
49
  _ref$inputType = _ref.inputType,
51
- inputType = _ref$inputType === void 0 ? defaults.inputType : _ref$inputType,
50
+ inputType = _ref$inputType === void 0 ? 'text' : _ref$inputType,
52
51
  invalidInputText = _ref.invalidInputText,
53
52
  loading = _ref.loading,
54
53
  loadingMessage = _ref.loadingMessage,
@@ -85,7 +84,10 @@ exports.ExportModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
85
84
  React.useEffect(function () {
86
85
  var _preformattedExtensio;
87
86
  setName(filename);
88
- setExtension(preformattedExtensions === null || preformattedExtensions === void 0 || (_preformattedExtensio = preformattedExtensions[0]) === null || _preformattedExtensio === void 0 ? void 0 : _preformattedExtensio.extension);
87
+ if (preformattedExtensions && preformattedExtensions.length > 0 && (_preformattedExtensio = preformattedExtensions[0]) !== null && _preformattedExtensio !== void 0 && _preformattedExtensio.extension) {
88
+ var _preformattedExtensio2;
89
+ setExtension(preformattedExtensions === null || preformattedExtensions === void 0 || (_preformattedExtensio2 = preformattedExtensions[0]) === null || _preformattedExtensio2 === void 0 ? void 0 : _preformattedExtensio2.extension);
90
+ }
89
91
  }, [filename, preformattedExtensions, open]);
90
92
  var onNameChangeHandler = function onNameChangeHandler(evt) {
91
93
  setName(evt.target.value);
@@ -98,7 +100,7 @@ exports.ExportModal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
98
100
  };
99
101
  var onSubmitHandler = function onSubmitHandler() {
100
102
  var returnName = extension ? "".concat(filename, ".").concat(extension.toLocaleLowerCase()) : name;
101
- onRequestSubmit(returnName);
103
+ onRequestSubmit && onRequestSubmit(returnName);
102
104
  };
103
105
  var hasInvalidExtension = function hasInvalidExtension() {
104
106
  if (!dirtyInput || !validExtensions || !validExtensions.length) {
@@ -195,6 +197,7 @@ exports.ExportModal.propTypes = {
195
197
  /**
196
198
  * Body content for the modal
197
199
  */
200
+ /**@ts-ignore*/
198
201
  body: index["default"].string,
199
202
  /**
200
203
  * Optional class name
@@ -223,6 +226,7 @@ exports.ExportModal.propTypes = {
223
226
  /**
224
227
  * specify the type of text input
225
228
  */
229
+ /**@ts-ignore */
226
230
  inputType: index["default"].oneOf(['text', 'password']),
227
231
  /**
228
232
  * text for an invalid input
@@ -255,6 +259,7 @@ exports.ExportModal.propTypes = {
255
259
  /**
256
260
  * Array of extensions to display as radio buttons
257
261
  */
262
+ /**@ts-ignore */
258
263
  preformattedExtensions: index["default"].arrayOf(index["default"].shape({
259
264
  extension: index["default"].string,
260
265
  description: index["default"].string
@@ -290,6 +295,7 @@ exports.ExportModal.propTypes = {
290
295
  /**
291
296
  * array of valid extensions the file can have
292
297
  */
298
+ /**@ts-ignore */
293
299
  validExtensions: index["default"].array
294
300
  };
295
301
  exports.ExportModal.displayName = componentName;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A container with a label and optional count.
3
+ */
4
+ export let FilterPanelAccordion: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';
@@ -0,0 +1,90 @@
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
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var react = require('@carbon/react');
17
+ var devtools = require('../../../global/js/utils/devtools.js');
18
+ var settings = require('../../../settings.js');
19
+ var FilterPanelGroup = require('../FilterPanelGroup/FilterPanelGroup.js');
20
+
21
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
+
23
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
25
+
26
+ var _excluded = ["accordionProps", "children", "className", "count", "labelText", "title"],
27
+ _excluded2 = ["align"];
28
+
29
+ // The block part of our conventional BEM class names (blockClass__E--M).
30
+ var blockClass = "".concat(settings.pkg.prefix, "--filter-panel-accordion");
31
+ var componentName = 'FilterPanelAccordion';
32
+ var defaults = {
33
+ accordionProps: {}
34
+ };
35
+
36
+ /**
37
+ * A container with a label and optional count.
38
+ */
39
+ exports.FilterPanelAccordion = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
40
+ var _ref$accordionProps = _ref.accordionProps,
41
+ accordionProps = _ref$accordionProps === void 0 ? defaults.accordionProps : _ref$accordionProps,
42
+ children = _ref.children,
43
+ className = _ref.className,
44
+ count = _ref.count,
45
+ labelText = _ref.labelText,
46
+ title = _ref.title,
47
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
48
+ var align = accordionProps.align,
49
+ otherAccordionProps = _rollupPluginBabelHelpers.objectWithoutProperties(accordionProps, _excluded2);
50
+ return /*#__PURE__*/React__default["default"].createElement(FilterPanelGroup.FilterPanelGroup, _rollupPluginBabelHelpers["extends"]({}, rest, {
51
+ className: cx__default["default"](blockClass, className),
52
+ count: count,
53
+ labelText: labelText,
54
+ ref: ref,
55
+ title: title
56
+ }, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement(react.Accordion, _rollupPluginBabelHelpers["extends"]({}, otherAccordionProps, {
57
+ align: align || 'start',
58
+ className: "".concat(blockClass, "__list")
59
+ }), children));
60
+ });
61
+
62
+ // Return a placeholder if not released and not enabled by feature flag
63
+ exports.FilterPanelAccordion = settings.pkg.checkComponentEnabled(exports.FilterPanelAccordion, componentName);
64
+ exports.FilterPanelAccordion.displayName = componentName;
65
+ exports.FilterPanelAccordion.propTypes = {
66
+ /**
67
+ * Props specific to the internal `Accordion` component.
68
+ */
69
+ accordionProps: index["default"].shape({}),
70
+ /**
71
+ * Provide the contents of the FilterPanelAccordion.
72
+ */
73
+ children: index["default"].node.isRequired,
74
+ /**
75
+ * Optional class to be applied to the containing node.
76
+ */
77
+ className: index["default"].string,
78
+ /**
79
+ * Number to be displayed with the label.
80
+ */
81
+ count: index["default"].oneOfType([index["default"].number, index["default"].string]),
82
+ /**
83
+ * The label for the component.
84
+ */
85
+ labelText: index["default"].node.isRequired,
86
+ /**
87
+ * Optional title attribute for the label.
88
+ */
89
+ title: index["default"].string
90
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A container with a label and optional count.
3
+ */
4
+ export let FilterPanelAccordionItem: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';
@@ -0,0 +1,101 @@
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
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var react = require('@carbon/react');
17
+ var devtools = require('../../../global/js/utils/devtools.js');
18
+ var settings = require('../../../settings.js');
19
+ var FilterPanelLabel = require('../FilterPanelLabel/FilterPanelLabel.js');
20
+ var TruncatedList = require('../../TruncatedList/TruncatedList.js');
21
+
22
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
23
+
24
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
25
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
26
+
27
+ var _excluded = ["accordionItemProps", "truncatedListProps", "children", "className", "count", "labelText", "title"];
28
+
29
+ // The block part of our conventional BEM class names (blockClass__E--M).
30
+ var blockClass = "".concat(settings.pkg.prefix, "--filter-panel-accordion-item");
31
+ var componentName = 'FilterPanelAccordionItem';
32
+ var defaults = {
33
+ accordionItemProps: {},
34
+ truncatedListProps: {}
35
+ };
36
+
37
+ /**
38
+ * A container with a label and optional count.
39
+ */
40
+ exports.FilterPanelAccordionItem = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
41
+ var _ref$accordionItemPro = _ref.accordionItemProps,
42
+ accordionItemProps = _ref$accordionItemPro === void 0 ? defaults.accordionItemProps : _ref$accordionItemPro,
43
+ _ref$truncatedListPro = _ref.truncatedListProps,
44
+ truncatedListProps = _ref$truncatedListPro === void 0 ? defaults.truncatedListProps : _ref$truncatedListPro,
45
+ children = _ref.children,
46
+ className = _ref.className,
47
+ count = _ref.count,
48
+ labelText = _ref.labelText,
49
+ title = _ref.title,
50
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
51
+ return /*#__PURE__*/React__default["default"].createElement(react.AccordionItem, _rollupPluginBabelHelpers["extends"]({}, accordionItemProps, {
52
+ className: cx__default["default"](blockClass, className),
53
+ ref: ref,
54
+ title: /*#__PURE__*/React__default["default"].createElement(FilterPanelLabel.FilterPanelLabel, _rollupPluginBabelHelpers["extends"]({}, rest, {
55
+ count: count,
56
+ labelText: labelText,
57
+ title: title
58
+ }))
59
+ }, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement(TruncatedList.TruncatedList, _rollupPluginBabelHelpers["extends"]({}, truncatedListProps, {
60
+ className: "".concat(blockClass, "__list")
61
+ }), React.Children.map(children, function (child) {
62
+ return /*#__PURE__*/React__default["default"].createElement(react.ListItem, {
63
+ className: "".concat(blockClass, "__list-item"),
64
+ key: child.key
65
+ }, child);
66
+ })));
67
+ });
68
+
69
+ // Return a placeholder if not released and not enabled by feature flag
70
+ exports.FilterPanelAccordionItem = settings.pkg.checkComponentEnabled(exports.FilterPanelAccordionItem, componentName);
71
+ exports.FilterPanelAccordionItem.displayName = componentName;
72
+ exports.FilterPanelAccordionItem.propTypes = {
73
+ /**
74
+ * Props specific to the internal `AccordionItem` component.
75
+ */
76
+ accordionItemProps: index["default"].shape({}),
77
+ /**
78
+ * Provide the contents of the FilterPanelAccordionItem.
79
+ */
80
+ children: index["default"].node.isRequired,
81
+ /**
82
+ * Optional class to be applied to the containing node.
83
+ */
84
+ className: index["default"].string,
85
+ /**
86
+ * Number to be displayed with the label.
87
+ */
88
+ count: index["default"].oneOfType([index["default"].number, index["default"].string]),
89
+ /**
90
+ * The label for the component.
91
+ */
92
+ labelText: index["default"].node.isRequired,
93
+ /**
94
+ * Optional title attribute for the label.
95
+ */
96
+ title: index["default"].string,
97
+ /**
98
+ * Props specific to the internal `TruncatedList` component.
99
+ */
100
+ truncatedListProps: index["default"].shape({})
101
+ };
@@ -1,5 +1,10 @@
1
1
  /**
2
2
  * Provides a checkbox, label, and count.
3
+ *
4
+ * This component is returning Carbon's Checkbox.
5
+ *
6
+ * All of Carbon Checkbox's props are directly available
7
+ * through "...rest", including id, onClick, etc.
3
8
  */
4
9
  export let FilterPanelCheckbox: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
10
  import React from 'react';
@@ -23,7 +23,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
23
23
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
24
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
25
25
 
26
- var _excluded = ["className", "count", "labelText", "title"];
26
+ var _excluded = ["className", "count", "id", "labelText", "title"];
27
27
 
28
28
  // The block part of our conventional BEM class names (blockClass__E--M).
29
29
  var blockClass = "".concat(settings.pkg.prefix, "--filter-panel-checkbox");
@@ -31,15 +31,22 @@ var componentName = 'FilterPanelCheckbox';
31
31
 
32
32
  /**
33
33
  * Provides a checkbox, label, and count.
34
+ *
35
+ * This component is returning Carbon's Checkbox.
36
+ *
37
+ * All of Carbon Checkbox's props are directly available
38
+ * through "...rest", including id, onClick, etc.
34
39
  */
35
40
  exports.FilterPanelCheckbox = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
36
41
  var className = _ref.className,
37
42
  count = _ref.count,
43
+ id = _ref.id,
38
44
  labelText = _ref.labelText,
39
45
  title = _ref.title,
40
46
  rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
41
47
  return /*#__PURE__*/React__default["default"].createElement(react.Checkbox, _rollupPluginBabelHelpers["extends"]({}, rest, {
42
48
  className: cx__default["default"](blockClass, className),
49
+ id: id,
43
50
  labelText: /*#__PURE__*/React__default["default"].createElement(FilterPanelLabel.FilterPanelLabel, {
44
51
  count: count,
45
52
  labelText: labelText,
@@ -53,15 +60,6 @@ exports.FilterPanelCheckbox = /*#__PURE__*/React__default["default"].forwardRef(
53
60
  exports.FilterPanelCheckbox = settings.pkg.checkComponentEnabled(exports.FilterPanelCheckbox, componentName);
54
61
  exports.FilterPanelCheckbox.displayName = componentName;
55
62
  exports.FilterPanelCheckbox.propTypes = {
56
- /**
57
- * IMPORTANT NOTE
58
- *
59
- * This component is returning Carbon's Checkbox.
60
- *
61
- * All of Carbon Checkbox's props are directly available
62
- * through "...rest", including id, onClick, etc.
63
- */
64
-
65
63
  /**
66
64
  * Optional class to be applied to the containing node.
67
65
  */
@@ -0,0 +1 @@
1
+ export { FilterPanelCheckbox } from "./FilterPanelCheckbox";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Provides a filter panel checkbox with an overflow menu.
3
+ *
4
+ * This component's props refer to the Carbon Checkbox,
5
+ * just like FilterPanelCheckbox.
6
+ *
7
+ * Use `overflowMenuProps` for properties specific to the OverflowMenu.
8
+ */
9
+ export let FilterPanelCheckboxWithOverflow: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
10
+ import React from 'react';
@@ -0,0 +1,164 @@
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
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var react = require('@carbon/react');
17
+ var devtools = require('../../../global/js/utils/devtools.js');
18
+ var settings = require('../../../settings.js');
19
+ var FilterPanelCheckbox = require('../FilterPanelCheckbox/FilterPanelCheckbox.js');
20
+
21
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
+
23
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
25
+
26
+ var _excluded = ["children", "className", "count", "id", "labelText", "overflowMenuProps", "title"];
27
+
28
+ // The block part of our conventional BEM class names (blockClass__E--M).
29
+ var blockClass = "".concat(settings.pkg.prefix, "--filter-panel-checkbox-with-overflow");
30
+ var componentName = 'FilterPanelCheckboxWithOverflow';
31
+ var defaults = {
32
+ overflowMenuProps: {}
33
+ };
34
+
35
+ /**
36
+ * Provides a filter panel checkbox with an overflow menu.
37
+ *
38
+ * This component's props refer to the Carbon Checkbox,
39
+ * just like FilterPanelCheckbox.
40
+ *
41
+ * Use `overflowMenuProps` for properties specific to the OverflowMenu.
42
+ */
43
+ exports.FilterPanelCheckboxWithOverflow = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
44
+ var children = _ref.children,
45
+ className = _ref.className,
46
+ count = _ref.count,
47
+ id = _ref.id,
48
+ labelText = _ref.labelText,
49
+ _ref$overflowMenuProp = _ref.overflowMenuProps,
50
+ overflowMenuProps = _ref$overflowMenuProp === void 0 ? defaults.overflowMenuProps : _ref$overflowMenuProp,
51
+ title = _ref.title,
52
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
53
+ var _useState = React.useState(false),
54
+ _useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
55
+ menuIsOpen = _useState2[0],
56
+ setMenuIsOpen = _useState2[1];
57
+ var _useState3 = React.useState(false),
58
+ _useState4 = _rollupPluginBabelHelpers.slicedToArray(_useState3, 2),
59
+ showMenuButton = _useState4[0],
60
+ setShowMenuButton = _useState4[1];
61
+ // Destructure overflow menu properties.
62
+ var other = _rollupPluginBabelHelpers["extends"]({}, (_rollupPluginBabelHelpers.objectDestructuringEmpty(overflowMenuProps), overflowMenuProps));
63
+ var backupRef = React.useRef();
64
+ var localRef = ref || backupRef;
65
+ var setHideButton = function setHideButton(activeElement) {
66
+ if (!menuIsOpen && !localRef.current.contains(activeElement)) {
67
+ setShowMenuButton(false);
68
+ }
69
+ };
70
+ React.useEffect(function () {
71
+ setShowMenuButton(menuIsOpen);
72
+ }, [menuIsOpen]);
73
+ return (
74
+ /*#__PURE__*/
75
+ // eslint-disable-next-line jsx-a11y/no-static-element-interactions
76
+ React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
77
+ className: cx__default["default"](blockClass, className, _rollupPluginBabelHelpers.defineProperty({}, "".concat(blockClass, "--open"), menuIsOpen)),
78
+ onBlur: function onBlur(_ref2) {
79
+ var relatedTarget = _ref2.relatedTarget;
80
+ return setHideButton(relatedTarget);
81
+ },
82
+ onFocus: function onFocus() {
83
+ return setShowMenuButton(true);
84
+ }
85
+ /**
86
+ * Desired behavior: onMouseEnter shows the menu, even when the user mouse-presses and -releases the checkbox/label.
87
+ * Issue: onMouseDown > checkbox/label triggers an onBlur event and hides the menu button.
88
+ * Releasing the mouse button then shows the button again.
89
+ * This behavior "flickers" the menu button.
90
+ * Solution: onMouseDown > preventDefault prevents onBlur from being called.
91
+ * The menu button remains visible at all times.
92
+ * This applies only when using the mouse; it is not an issue using the keyboard.
93
+ */,
94
+ onMouseDown: function onMouseDown(event) {
95
+ return event.preventDefault();
96
+ },
97
+ onMouseEnter: function onMouseEnter() {
98
+ return setShowMenuButton(true);
99
+ },
100
+ onMouseLeave: function onMouseLeave() {
101
+ return setHideButton(document.activeElement);
102
+ },
103
+ ref: localRef
104
+ }, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement(FilterPanelCheckbox.FilterPanelCheckbox, _rollupPluginBabelHelpers["extends"]({}, rest, {
105
+ className: cx__default["default"]("".concat(blockClass, "__checkbox")),
106
+ count: count,
107
+ id: id,
108
+ labelText: labelText,
109
+ title: title
110
+ })), showMenuButton && /*#__PURE__*/React__default["default"].createElement(react.OverflowMenu, _rollupPluginBabelHelpers["extends"]({
111
+ open: overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.open,
112
+ className: cx__default["default"]("".concat(blockClass, "__overflow-button"), overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.menuClass),
113
+ menuOptionsClass: cx__default["default"]("".concat(blockClass, "__overflow-options"), overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.menuOptionsClass),
114
+ "aria-label": overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps['aria-label'],
115
+ iconDescription: overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps['aria-label'],
116
+ onOpen: function onOpen() {
117
+ return setMenuIsOpen(true);
118
+ },
119
+ onClose: function onClose() {
120
+ return setMenuIsOpen(false);
121
+ },
122
+ flipped: (overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.flipped) || true,
123
+ selectorPrimaryFocus: overflowMenuProps === null || overflowMenuProps === void 0 ? void 0 : overflowMenuProps.selectorPrimaryFocus
124
+ }, other), children))
125
+ );
126
+ });
127
+
128
+ // Return a placeholder if not released and not enabled by feature flag
129
+ exports.FilterPanelCheckboxWithOverflow = settings.pkg.checkComponentEnabled(exports.FilterPanelCheckboxWithOverflow, componentName);
130
+ exports.FilterPanelCheckboxWithOverflow.displayName = componentName;
131
+ exports.FilterPanelCheckboxWithOverflow.propTypes = {
132
+ /**
133
+ * Children containing `OverflowMenuItems`.
134
+ */
135
+ children: index["default"].node.isRequired,
136
+ /**
137
+ * Optional class to be applied to the containing node.
138
+ */
139
+ className: index["default"].string,
140
+ /**
141
+ * Number to be displayed with the checkbox.
142
+ */
143
+ count: index["default"].oneOfType([index["default"].number, index["default"].string]),
144
+ /**
145
+ * Unique identifier.
146
+ */
147
+ id: index["default"].string.isRequired,
148
+ /**
149
+ * Label to be displayed with the checkbox.
150
+ */
151
+ labelText: index["default"].node.isRequired,
152
+ /**
153
+ * Checkbox event handler.
154
+ */
155
+ onChange: index["default"].func,
156
+ /**
157
+ * Props specific to the internal `OverflowMenu` component.
158
+ */
159
+ overflowMenuProps: index["default"].shape(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty(_rollupPluginBabelHelpers.defineProperty({}, 'aria-label', index["default"].string), "flipped", index["default"].bool), "menuClass", index["default"].string), "menuOptionsClass", index["default"].string), "open", index["default"].bool), "selectorPrimaryFocus", index["default"].string)),
160
+ /**
161
+ * Optional title attribute for the label.
162
+ */
163
+ title: index["default"].string
164
+ };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * A container with a label and optional count.
3
+ */
4
+ export let FilterPanelGroup: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';
@@ -0,0 +1,79 @@
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
+ 'use strict';
9
+
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
+
12
+ var _rollupPluginBabelHelpers = require('../../../_virtual/_rollupPluginBabelHelpers.js');
13
+ var React = require('react');
14
+ var index = require('../../../node_modules/prop-types/index.js');
15
+ var cx = require('classnames');
16
+ var devtools = require('../../../global/js/utils/devtools.js');
17
+ var settings = require('../../../settings.js');
18
+ var FilterPanelLabel = require('../FilterPanelLabel/FilterPanelLabel.js');
19
+
20
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
+
22
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
23
+ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
24
+
25
+ var _excluded = ["children", "className", "count", "labelText", "title"];
26
+
27
+ // The block part of our conventional BEM class names (blockClass__E--M).
28
+ var blockClass = "".concat(settings.pkg.prefix, "--filter-panel-group");
29
+ var componentName = 'FilterPanelGroup';
30
+
31
+ /**
32
+ * A container with a label and optional count.
33
+ */
34
+ exports.FilterPanelGroup = /*#__PURE__*/React__default["default"].forwardRef(function (_ref, ref) {
35
+ var children = _ref.children,
36
+ className = _ref.className,
37
+ count = _ref.count,
38
+ labelText = _ref.labelText,
39
+ title = _ref.title,
40
+ rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
41
+ return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({}, rest, {
42
+ className: cx__default["default"](blockClass, className),
43
+ ref: ref
44
+ }, devtools.getDevtoolsProps(componentName)), labelText && /*#__PURE__*/React__default["default"].createElement("h2", {
45
+ className: "".concat(blockClass, "__title")
46
+ }, /*#__PURE__*/React__default["default"].createElement(FilterPanelLabel.FilterPanelLabel, {
47
+ count: count,
48
+ labelText: labelText,
49
+ title: title
50
+ })), /*#__PURE__*/React__default["default"].createElement("div", {
51
+ className: "".concat(blockClass, "__content")
52
+ }, children));
53
+ });
54
+
55
+ // Return a placeholder if not released and not enabled by feature flag
56
+ exports.FilterPanelGroup = settings.pkg.checkComponentEnabled(exports.FilterPanelGroup, componentName);
57
+ exports.FilterPanelGroup.displayName = componentName;
58
+ exports.FilterPanelGroup.propTypes = {
59
+ /**
60
+ * Provide the contents of the FilterPanelGroup.
61
+ */
62
+ children: index["default"].node.isRequired,
63
+ /**
64
+ * Optional class to be applied to the containing node.
65
+ */
66
+ className: index["default"].string,
67
+ /**
68
+ * Number to be displayed with the label.
69
+ */
70
+ count: index["default"].oneOfType([index["default"].number, index["default"].string]),
71
+ /**
72
+ * The label for the component.
73
+ */
74
+ labelText: index["default"].node.isRequired,
75
+ /**
76
+ * Optional title attribute for the label.
77
+ */
78
+ title: index["default"].string
79
+ };
@@ -42,9 +42,9 @@ exports.FilterPanelLabel = /*#__PURE__*/React__default["default"].forwardRef(fun
42
42
  }, devtools.getDevtoolsProps(componentName)), /*#__PURE__*/React__default["default"].createElement("span", {
43
43
  className: "".concat(blockClass, "__text"),
44
44
  title: title
45
- }, labelText), /*#__PURE__*/React__default["default"].createElement("span", {
45
+ }, labelText), count && /*#__PURE__*/React__default["default"].createElement("span", {
46
46
  className: "".concat(blockClass, "__count")
47
- }, count));
47
+ }, count), ' ');
48
48
  });
49
49
 
50
50
  // Return a placeholder if not released and not enabled by feature flag
@@ -0,0 +1,5 @@
1
+ /**
2
+ * An input field and container to show search results.
3
+ */
4
+ export let FilterPanelSearch: React.ForwardRefExoticComponent<React.RefAttributes<any>>;
5
+ import React from 'react';