@carbon/ibm-products 2.73.0 → 2.73.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/es/components/APIKeyModal/APIKeyModal.js +9 -28
  2. package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -12
  3. package/es/components/CreateFullPage/CreateFullPage.js +2 -2
  4. package/es/components/CreateFullPage/CreateFullPageStep.d.ts +1 -1
  5. package/es/components/CreateFullPage/CreateFullPageStep.js +1 -6
  6. package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +1 -1
  7. package/es/components/CreateTearsheet/CreateTearsheetStep.js +2 -12
  8. package/es/components/EditSidePanel/EditSidePanel.d.ts +1 -1
  9. package/es/components/EditSidePanel/EditSidePanel.js +1 -6
  10. package/es/components/EditTearsheet/EditTearsheetForm.d.ts +1 -1
  11. package/es/components/EditTearsheet/EditTearsheetForm.js +2 -12
  12. package/es/components/EmptyStates/EmptyState.d.ts +1 -1
  13. package/es/components/EmptyStates/EmptyState.js +1 -6
  14. package/es/components/PageHeader/PageHeader.js +11 -50
  15. package/es/components/PageHeader/PageHeaderTitle.js +6 -12
  16. package/es/components/SidePanel/SidePanel.js +2 -12
  17. package/es/components/SimpleHeader/SimpleHeader.d.ts +7 -8
  18. package/es/components/SimpleHeader/SimpleHeader.js +2 -4
  19. package/es/components/TagOverflow/TagOverflow.d.ts +1 -6
  20. package/es/components/TagOverflow/TagOverflow.js +5 -17
  21. package/es/components/TagSet/TagSet.d.ts +0 -5
  22. package/es/components/TagSet/TagSet.js +1 -13
  23. package/es/components/UserAvatar/UserAvatar.d.ts +1 -1
  24. package/es/components/UserAvatar/UserAvatar.js +1 -6
  25. package/es/components/UserProfileImage/UserProfileImage.d.ts +1 -1
  26. package/es/components/UserProfileImage/UserProfileImage.js +1 -6
  27. package/es/global/js/utils/props-helper.d.ts +0 -6
  28. package/es/global/js/utils/props-helper.js +2 -39
  29. package/lib/components/APIKeyModal/APIKeyModal.js +9 -28
  30. package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -12
  31. package/lib/components/CreateFullPage/CreateFullPage.js +1 -1
  32. package/lib/components/CreateFullPage/CreateFullPageStep.d.ts +1 -1
  33. package/lib/components/CreateFullPage/CreateFullPageStep.js +1 -6
  34. package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +1 -1
  35. package/lib/components/CreateTearsheet/CreateTearsheetStep.js +2 -12
  36. package/lib/components/EditSidePanel/EditSidePanel.d.ts +1 -1
  37. package/lib/components/EditSidePanel/EditSidePanel.js +1 -6
  38. package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +1 -1
  39. package/lib/components/EditTearsheet/EditTearsheetForm.js +2 -12
  40. package/lib/components/EmptyStates/EmptyState.d.ts +1 -1
  41. package/lib/components/EmptyStates/EmptyState.js +1 -6
  42. package/lib/components/PageHeader/PageHeader.js +10 -49
  43. package/lib/components/PageHeader/PageHeaderTitle.js +5 -12
  44. package/lib/components/SidePanel/SidePanel.js +2 -12
  45. package/lib/components/SimpleHeader/SimpleHeader.d.ts +7 -8
  46. package/lib/components/SimpleHeader/SimpleHeader.js +1 -4
  47. package/lib/components/TagOverflow/TagOverflow.d.ts +1 -6
  48. package/lib/components/TagOverflow/TagOverflow.js +4 -18
  49. package/lib/components/TagSet/TagSet.d.ts +0 -5
  50. package/lib/components/TagSet/TagSet.js +0 -14
  51. package/lib/components/UserAvatar/UserAvatar.d.ts +1 -1
  52. package/lib/components/UserAvatar/UserAvatar.js +1 -6
  53. package/lib/components/UserProfileImage/UserProfileImage.d.ts +1 -1
  54. package/lib/components/UserProfileImage/UserProfileImage.js +1 -6
  55. package/lib/global/js/utils/props-helper.d.ts +0 -6
  56. package/lib/global/js/utils/props-helper.js +1 -39
  57. package/package.json +2 -2
  58. package/es/global/js/utils/unwrap-if-fragment.d.ts +0 -6
  59. package/lib/global/js/utils/unwrap-if-fragment.d.ts +0 -6
@@ -15,7 +15,6 @@ import { APIKeyDownloader } from './APIKeyDownloader.js';
15
15
  import { pkg } from '../../settings.js';
16
16
  import { usePortalTarget } from '../../global/js/hooks/usePortalTarget.js';
17
17
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
18
- import { isRequiredIf } from '../../global/js/utils/props-helper.js';
19
18
  import uuidv4 from '../../global/js/utils/uuidv4.js';
20
19
  import { useFocus } from '../../global/js/hooks/useFocus.js';
21
20
  import { usePreviousValue } from '../../global/js/hooks/usePreviousValue.js';
@@ -309,24 +308,6 @@ let APIKeyModal = /*#__PURE__*/forwardRef((_ref, ref) => {
309
308
  disabled: isPrimaryButtonDisabled()
310
309
  }), getPrimaryButtonText())))));
311
310
  });
312
- const customStepsRequiredProps = type => isRequiredIf(type, _ref2 => {
313
- let {
314
- customSteps
315
- } = _ref2;
316
- return customSteps && customSteps.length > 1;
317
- });
318
- const editRequiredProps = type => isRequiredIf(type, _ref3 => {
319
- let {
320
- editing
321
- } = _ref3;
322
- return editing;
323
- });
324
- const downloadRequiredProps = type => isRequiredIf(type, _ref4 => {
325
- let {
326
- hasDownloadLink
327
- } = _ref4;
328
- return hasDownloadLink;
329
- });
330
311
 
331
312
  // Return a placeholder if not released and not enabled by feature flag
332
313
  APIKeyModal = pkg.checkComponentEnabled(APIKeyModal, componentName);
@@ -404,31 +385,31 @@ APIKeyModal.propTypes = {
404
385
  /**
405
386
  * designates the name of downloadable json file with the key. if not specified will default to 'apikey'
406
387
  */
407
- downloadFileName: downloadRequiredProps(PropTypes.string),
388
+ downloadFileName: PropTypes.string,
408
389
  /**
409
390
  * designates the file type for the downloadable key
410
391
  */
411
- downloadFileType: downloadRequiredProps(PropTypes.oneOf(['txt', 'json'])),
392
+ downloadFileType: PropTypes.oneOf(['txt', 'json']),
412
393
  /**
413
394
  * aria-label for the download link
414
395
  */
415
- downloadLinkLabel: downloadRequiredProps(PropTypes.string),
396
+ downloadLinkLabel: PropTypes.string,
416
397
  /**
417
398
  * anchor text for the download link
418
399
  */
419
- downloadLinkText: downloadRequiredProps(PropTypes.string),
400
+ downloadLinkText: PropTypes.string,
420
401
  /**
421
402
  * text for the edit button
422
403
  */
423
- editButtonText: editRequiredProps(PropTypes.string),
404
+ editButtonText: PropTypes.string,
424
405
  /**
425
406
  * designates if the edit request was successful
426
407
  */
427
- editSuccess: editRequiredProps(PropTypes.bool),
408
+ editSuccess: PropTypes.bool,
428
409
  /**
429
410
  * title for a successful edit
430
411
  */
431
- editSuccessMessage: editRequiredProps(PropTypes.string),
412
+ editSuccessMessage: PropTypes.string,
432
413
  /**
433
414
  * designates if the modal is in the edit mode
434
415
  */
@@ -511,7 +492,7 @@ APIKeyModal.propTypes = {
511
492
  /**
512
493
  * text that displays in the primary button when using custom steps to indicate to the user that there is a next step
513
494
  */
514
- nextStepButtonText: customStepsRequiredProps(PropTypes.string),
495
+ nextStepButtonText: PropTypes.string,
515
496
  /**
516
497
  * handler for on modal close
517
498
  */
@@ -540,7 +521,7 @@ APIKeyModal.propTypes = {
540
521
  /**
541
522
  * text that displays in the secondary button when using custom steps to indicate to the user that there is a previous step
542
523
  */
543
- previousStepButtonText: customStepsRequiredProps(PropTypes.string),
524
+ previousStepButtonText: PropTypes.string,
544
525
  /**
545
526
  * label text that's displayed when hovering over visibility toggler to show key
546
527
  */
@@ -300,12 +300,7 @@ BreadcrumbWithOverflow.propTypes = {
300
300
  /**
301
301
  * A string based alternative to the children, required only if children is not of type string
302
302
  */
303
- title: PropTypes.string.isRequired.if(_ref5 => {
304
- let {
305
- label
306
- } = _ref5;
307
- return typeof label !== 'string';
308
- })
303
+ title: PropTypes.string
309
304
  })),
310
305
  /**
311
306
  * className
@@ -326,12 +321,7 @@ BreadcrumbWithOverflow.propTypes = {
326
321
  /**
327
322
  * overflowAriaLabel label for open close button overflow used for breadcrumb items that do not fit.
328
323
  */
329
- overflowAriaLabel: PropTypes.string.isRequired.if(_ref6 => {
330
- let {
331
- breadcrumbs
332
- } = _ref6;
333
- return breadcrumbs.length > 1;
334
- }),
324
+ overflowAriaLabel: PropTypes.string,
335
325
  /**
336
326
  * overflowTooltipAlign: align tooltip position
337
327
  */
@@ -8,7 +8,7 @@
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import { Tooltip, Form, ComposedModal, ModalHeader, ModalBody, ModalFooter, Button } from '@carbon/react';
10
10
  import React__default, { useState, isValidElement, useEffect, createContext } from 'react';
11
- import { overflowAriaLabel_required_if_breadcrumbs_exist, SimpleHeader } from '../SimpleHeader/SimpleHeader.js';
11
+ import { SimpleHeader } from '../SimpleHeader/SimpleHeader.js';
12
12
  import { ActionSet } from '../ActionSet/ActionSet.js';
13
13
  import PropTypes from '../../_virtual/index.js';
14
14
  import cx from 'classnames';
@@ -253,7 +253,7 @@ CreateFullPage.propTypes = {
253
253
  /**
254
254
  * Label for open/close overflow button used for breadcrumb items that do not fit
255
255
  */
256
- breadcrumbsOverflowAriaLabel: overflowAriaLabel_required_if_breadcrumbs_exist,
256
+ breadcrumbsOverflowAriaLabel: PropTypes.string,
257
257
  /**
258
258
  * The cancel button text
259
259
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2021, 2023
2
+ * Copyright IBM Corp. 2021, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -150,12 +150,7 @@ CreateFullPageStep.propTypes = {
150
150
  * This is the legend text that appears above a fieldset html element for accessibility purposes. It is required when the optional `hasFieldset` prop is provided to a FullPageStep.
151
151
  */
152
152
  /**@ts-ignore */
153
- fieldsetLegendText: PropTypes.string.isRequired.if(_ref2 => {
154
- let {
155
- hasFieldset
156
- } = _ref2;
157
- return hasFieldset === true;
158
- }),
153
+ fieldsetLegendText: PropTypes.string,
159
154
  /**
160
155
  * This optional prop will render your form content inside of a fieldset html element
161
156
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2021, 2023
2
+ * Copyright IBM Corp. 2021, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -201,24 +201,14 @@ CreateTearsheetStep.propTypes = {
201
201
  * This is the required legend id that appears as the aria-labelledby of fieldset for accessibility purposes.
202
202
  */
203
203
  /**@ts-ignore*/
204
- fieldsetLegendId: PropTypes.node.isRequired.if(_ref2 => {
205
- let {
206
- hasFieldset
207
- } = _ref2;
208
- return !!hasFieldset;
209
- }),
204
+ fieldsetLegendId: PropTypes.node,
210
205
  /**
211
206
  * This is the required legend text that appears above a fieldset html element for accessibility purposes.
212
207
  * You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's step content.
213
208
  * Otherwise, use CSS to hide/remove this label text.
214
209
  */
215
210
  /**@ts-ignore*/
216
- fieldsetLegendText: PropTypes.string.isRequired.if(_ref3 => {
217
- let {
218
- hasFieldset
219
- } = _ref3;
220
- return !!hasFieldset;
221
- }),
211
+ fieldsetLegendText: PropTypes.string,
222
212
  /**
223
213
  * This optional prop will render your form content inside of a fieldset html element
224
214
  * and is defaulted to true.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2021, 2021
2
+ * Copyright IBM Corp. 2021, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -169,12 +169,7 @@ EditSidePanel.propTypes = {
169
169
  * This prop is required when using the `slideIn` variant of the side panel.
170
170
  */
171
171
  /**@ts-ignore*/
172
- selectorPageContent: PropTypes.string.isRequired.if(_ref2 => {
173
- let {
174
- slideIn
175
- } = _ref2;
176
- return slideIn;
177
- }),
172
+ selectorPageContent: PropTypes.string,
178
173
  /**
179
174
  * Specifies which DOM element in the form should be focused.
180
175
  */
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2022, 2022
2
+ * Copyright IBM Corp. 2022, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -89,24 +89,14 @@ EditTearsheetForm.propTypes = {
89
89
  * This is the required legend id that appears as the aria-labelledby of fieldset for accessibility purposes.
90
90
  */
91
91
  /**@ts-ignore */
92
- fieldsetLegendId: PropTypes.node.isRequired.if(_ref2 => {
93
- let {
94
- hasFieldset
95
- } = _ref2;
96
- return !!hasFieldset;
97
- }),
92
+ fieldsetLegendId: PropTypes.node,
98
93
  /**
99
94
  * This is the required legend text that appears above a fieldset html element for accessibility purposes.
100
95
  * You can set the `hasFieldset` prop to false if you have multiple fieldset elements or want to control the children of your Full Page's form content.
101
96
  * Otherwise, use CSS to hide/remove this label text.
102
97
  */
103
98
  /**@ts-ignore */
104
- fieldsetLegendText: PropTypes.string.isRequired.if(_ref3 => {
105
- let {
106
- hasFieldset
107
- } = _ref3;
108
- return !!hasFieldset;
109
- }),
99
+ fieldsetLegendText: PropTypes.string,
110
100
  /**
111
101
  * This optional prop will render your form content inside of a fieldset html element
112
102
  * and is defaulted to true.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2020, 2021
2
+ * Copyright IBM Corp. 2020, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -104,12 +104,7 @@ EmptyState.propTypes = {
104
104
  * The alt text for custom provided illustrations
105
105
  */
106
106
  /**@ts-ignore*/
107
- illustrationDescription: PropTypes.string.isRequired.if(_ref2 => {
108
- let {
109
- illustration
110
- } = _ref2;
111
- return illustration;
112
- }),
107
+ illustrationDescription: PropTypes.string,
113
108
  /**
114
109
  * Designates the position of the illustration relative to the content
115
110
  */
@@ -8,7 +8,7 @@
8
8
  import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
9
9
  import { Tooltip, Tag, Button, usePrefix, FlexGrid, Row, Column, DefinitionTooltip } from '@carbon/react';
10
10
  import React__default, { useState, useRef, useEffect } from 'react';
11
- import { string_required_if_more_than_10_tags, TagSet } from '../TagSet/TagSet.js';
11
+ import { TagSet } from '../TagSet/TagSet.js';
12
12
  import { spacing, baseFontSize, breakpoints } from '@carbon/layout';
13
13
  import { blockClass, utilSetCollapsed, utilGetBreadcrumbItemForTitle, utilCheckUpdateVerticalSpace } from './PageHeaderUtils.js';
14
14
  import { deprecateProp, prepareProps } from '../../global/js/utils/props-helper.js';
@@ -309,8 +309,6 @@ let PageHeader = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
309
309
  }, [actionBarItems, withoutBackground, breadcrumbs, headerRef, metrics.breadcrumbRowHeight, metrics.headerHeight, navigation, scrollYValue, hasCollapseHeaderToggle, tags]);
310
310
  useEffect(() => {
311
311
  // only has toggle if requested and withoutBackground is unset/falsy
312
- // NOTE: prop-types isRequired.if for the expand and collapse
313
- // icon descriptions depends on the this.
314
312
  setHasCollapseButton(hasCollapseHeaderToggle && !withoutBackground || false);
315
313
  }, [withoutBackground, hasCollapseHeaderToggle]);
316
314
  useEffect(() => {
@@ -591,12 +589,7 @@ PageHeader.propTypes = {
591
589
  * NOTE: This prop is required if actionBarItems are supplied
592
590
  */
593
591
  /**@ts-ignore */
594
- actionBarOverflowAriaLabel: PropTypes.string.isRequired.if(_ref7 => {
595
- let {
596
- actionBarItems
597
- } = _ref7;
598
- return actionBarItems && actionBarItems.length > 0;
599
- }),
592
+ actionBarOverflowAriaLabel: PropTypes.string,
600
593
  /**
601
594
  * When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
602
595
  * menu being shown. If in the overflow menu there is still insufficient space this label is used in a dialog showing
@@ -604,7 +597,7 @@ PageHeader.propTypes = {
604
597
  *
605
598
  * **Note: Required if more than 10 tags**
606
599
  */
607
- allTagsModalSearchLabel: string_required_if_more_than_10_tags,
600
+ allTagsModalSearchLabel: PropTypes.string,
608
601
  /**
609
602
  * When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
610
603
  * menu being shown. If in the overflow menu there is still insufficient space this placeholder is used in a dialog
@@ -612,7 +605,7 @@ PageHeader.propTypes = {
612
605
  *
613
606
  * **Note: Required if more than 10 tags**
614
607
  */
615
- allTagsModalSearchPlaceholderText: string_required_if_more_than_10_tags,
608
+ allTagsModalSearchPlaceholderText: PropTypes.string,
616
609
  /**
617
610
  * When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
618
611
  * menu being shown. If in the overflow menu there is still insufficient space this title is used in a dialog showing
@@ -620,18 +613,13 @@ PageHeader.propTypes = {
620
613
  *
621
614
  * **Note: Required if more than 10 tags**
622
615
  */
623
- allTagsModalTitle: string_required_if_more_than_10_tags,
616
+ allTagsModalTitle: PropTypes.string,
624
617
  /**
625
618
  * If the user supplies breadcrumbs then this property is required.
626
619
  * It is used in an overflow menu when there is insufficient space to display all breadcrumbs inline.
627
620
  */
628
621
  /**@ts-ignore */
629
- breadcrumbOverflowAriaLabel: PropTypes.string.isRequired.if(_ref8 => {
630
- let {
631
- breadcrumbs
632
- } = _ref8;
633
- return breadcrumbs && breadcrumbs.length > 0;
634
- }),
622
+ breadcrumbOverflowAriaLabel: PropTypes.string,
635
623
  /**
636
624
  * align breadcrumb overflow tooltip
637
625
  */
@@ -669,12 +657,7 @@ PageHeader.propTypes = {
669
657
  * A text version of the `label` for display, required if `label` is not a string.
670
658
  */
671
659
  /**@ts-ignore */
672
- title: PropTypes.string.isRequired.if(_ref9 => {
673
- let {
674
- label
675
- } = _ref9;
676
- return typeof label !== 'string';
677
- })
660
+ title: PropTypes.string
678
661
  })),
679
662
  /**
680
663
  * A zone for placing high-level, client content above the page tabs.
@@ -699,13 +682,7 @@ PageHeader.propTypes = {
699
682
  * required for both the expend and collapse states of the button component used.
700
683
  */
701
684
  /**@ts-ignore */
702
- collapseHeaderIconDescription: PropTypes.string.isRequired.if(_ref10 => {
703
- let {
704
- withoutBackground,
705
- hasCollapseHeaderToggle
706
- } = _ref10;
707
- return !withoutBackground && hasCollapseHeaderToggle;
708
- }),
685
+ collapseHeaderIconDescription: PropTypes.string,
709
686
  /**
710
687
  * The title row typically starts below the breadcrumb row. This option
711
688
  * preCollapses it into the breadcrumb row.
@@ -721,13 +698,7 @@ PageHeader.propTypes = {
721
698
  * required for both the expend and collapse states of the button component used.
722
699
  */
723
700
  /**@ts-ignore */
724
- expandHeaderIconDescription: PropTypes.string.isRequired.if(_ref11 => {
725
- let {
726
- withoutBackground,
727
- hasCollapseHeaderToggle
728
- } = _ref11;
729
- return !withoutBackground && hasCollapseHeaderToggle;
730
- }),
701
+ expandHeaderIconDescription: PropTypes.string,
731
702
  /**
732
703
  * The PageHeader is hosted in a Carbon grid, this value is passed through to the Carbon grid fullWidth prop.
733
704
  * 'xl' is used to override the grid width setting. Can be used with narrowGrid: true to get the largest size.
@@ -796,12 +767,7 @@ PageHeader.propTypes = {
796
767
  * NOTE: This prop is required if pageActions are supplied
797
768
  */
798
769
  /**@ts-ignore */
799
- pageActionsOverflowLabel: PropTypes.node.isRequired.if(_ref12 => {
800
- let {
801
- pageActions
802
- } = _ref12;
803
- return pageActions && pageActions.length > 0 && !pageActions.content;
804
- }),
770
+ pageActionsOverflowLabel: PropTypes.node,
805
771
  /**
806
772
  * When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
807
773
  * menu being shown. If in the overflow menu there is still insufficient space this label is used to offer a
@@ -809,7 +775,7 @@ PageHeader.propTypes = {
809
775
  *
810
776
  * **Note: Required if more than 10 tags**
811
777
  */
812
- showAllTagsLabel: string_required_if_more_than_10_tags,
778
+ showAllTagsLabel: PropTypes.string,
813
779
  /**
814
780
  * Sitting just below the title is this optional subtitle that provides additional context to
815
781
  * identify the current page.
@@ -864,18 +830,13 @@ PageHeader.propTypes = {
864
830
  loading: PropTypes.bool,
865
831
  // inline edit version properties
866
832
  editableLabel: PropTypes.string,
867
- // .isRequired.if(editInPlaceRequired),
868
833
  id: PropTypes.string,
869
- // .isRequired.if(editInPlaceRequired),
870
834
  onCancel: PropTypes.func,
871
835
  onChange: PropTypes.func,
872
836
  onSave: PropTypes.func,
873
837
  cancelDescription: PropTypes.string,
874
- //.isRequired.if(editInPlaceRequired),
875
838
  editDescription: PropTypes.string,
876
- // .isRequired.if(editInPlaceRequired),
877
839
  saveDescription: PropTypes.string,
878
- //.isRequired.if(editInPlaceRequired),
879
840
  tooltipAlignment: PropTypes.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right'])
880
841
  // Update docgen if changed
881
842
  }), PropTypes.string, PropTypes.shape({
@@ -93,12 +93,6 @@ const PageHeaderTitle = _ref => {
93
93
  title: titleText
94
94
  }, titleInnards);
95
95
  };
96
- const editInPlaceRequired = _ref2 => {
97
- let {
98
- onSave
99
- } = _ref2;
100
- return !!onSave;
101
- };
102
96
  PageHeaderTitle.propTypes = {
103
97
  // passed from page header
104
98
  blockClass: PropTypes.string.isRequired,
@@ -132,13 +126,13 @@ PageHeaderTitle.propTypes = {
132
126
  icon: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
133
127
  loading: PropTypes.bool,
134
128
  // inline edit version properties
135
- editDescription: PropTypes.string.isRequired.if(editInPlaceRequired),
136
- editableLabel: PropTypes.string.isRequired.if(editInPlaceRequired),
137
- id: PropTypes.string.isRequired.if(editInPlaceRequired),
129
+ editDescription: PropTypes.string,
130
+ editableLabel: PropTypes.string,
131
+ id: PropTypes.string,
138
132
  onChange: PropTypes.func,
139
133
  onSave: PropTypes.func,
140
- cancelDescription: PropTypes.string.isRequired.if(editInPlaceRequired),
141
- saveDescription: PropTypes.string.isRequired.if(editInPlaceRequired),
134
+ cancelDescription: PropTypes.string,
135
+ saveDescription: PropTypes.string,
142
136
  tooltipAlignment: PropTypes.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right'])
143
137
  // Update docgen if changed
144
138
  }), PropTypes.string, PropTypes.shape({
@@ -148,4 +142,4 @@ PageHeaderTitle.propTypes = {
148
142
  })])
149
143
  };
150
144
 
151
- export { PageHeaderTitle, editInPlaceRequired };
145
+ export { PageHeaderTitle };
@@ -697,12 +697,7 @@ SidePanel.propTypes = {
697
697
  * This prop is required when using the `slideIn` variant of the side panel.
698
698
  */
699
699
  /**@ts-ignore*/
700
- selectorPageContent: PropTypes.string.isRequired.if(_ref2 => {
701
- let {
702
- slideIn
703
- } = _ref2;
704
- return slideIn;
705
- }),
700
+ selectorPageContent: PropTypes.string,
706
701
  /**
707
702
  * Specify a CSS selector that matches the DOM element that should
708
703
  * be focused when the side panel opens
@@ -727,12 +722,7 @@ SidePanel.propTypes = {
727
722
  * Sets the title text
728
723
  */
729
724
  /**@ts-ignore*/
730
- title: PropTypes.string.isRequired.if(_ref3 => {
731
- let {
732
- labelText
733
- } = _ref3;
734
- return labelText;
735
- }),
725
+ title: PropTypes.string,
736
726
  ...deprecatedProps
737
727
  };
738
728
  SidePanel.displayName = componentName;
@@ -1,4 +1,3 @@
1
- export const overflowAriaLabel_required_if_breadcrumbs_exist: (props: any, propName: any, componentName: any, location: any, propFullName: any, secret: any) => any;
2
1
  /**
3
2
  * The SimpleHeader is not public and only used internally by CreateFullPage.
4
3
  *
@@ -23,13 +22,13 @@ export function SimpleHeader({ breadcrumbs, className, title, noTrailingSlash, m
23
22
  }): React.JSX.Element;
24
23
  export namespace SimpleHeader {
25
24
  namespace propTypes {
26
- export let breadcrumbs: any;
27
- export let className: any;
28
- export let maxVisible: any;
29
- export let noTrailingSlash: any;
30
- export { overflowAriaLabel_required_if_breadcrumbs_exist as overflowAriaLabel };
31
- export let overflowTooltipAlign: any;
32
- export let title: any;
25
+ let breadcrumbs: any;
26
+ let className: any;
27
+ let maxVisible: any;
28
+ let noTrailingSlash: any;
29
+ let overflowAriaLabel: any;
30
+ let overflowTooltipAlign: any;
31
+ let title: any;
33
32
  }
34
33
  }
35
34
  import React from 'react';
@@ -11,7 +11,6 @@ import React__default, { useCallback, useEffect } from 'react';
11
11
  import cx from 'classnames';
12
12
  import { pkg } from '../../settings.js';
13
13
  import pconsole from '../../global/js/utils/pconsole.js';
14
- import { isRequiredIf } from '../../global/js/utils/props-helper.js';
15
14
  import { Heading, Tooltip } from '@carbon/react';
16
15
  import { BreadcrumbWithOverflow } from '../BreadcrumbWithOverflow/BreadcrumbWithOverflow.js';
17
16
 
@@ -61,7 +60,6 @@ const SimpleHeader = _ref => {
61
60
  className: cx(`${blockClass}__title`)
62
61
  }, title));
63
62
  };
64
- const overflowAriaLabel_required_if_breadcrumbs_exist = isRequiredIf(PropTypes.string, props => props.breadcrumbs?.length > 0);
65
63
  SimpleHeader.propTypes = {
66
64
  /** Header breadcrumbs */
67
65
  breadcrumbs: PropTypes.arrayOf(PropTypes.shape({
@@ -83,7 +81,7 @@ SimpleHeader.propTypes = {
83
81
  /** A prop to omit the trailing slash for the breadcrumbs */
84
82
  noTrailingSlash: PropTypes.bool,
85
83
  /** Label for open/close overflow button used for breadcrumb items that do not fit */
86
- overflowAriaLabel: overflowAriaLabel_required_if_breadcrumbs_exist,
84
+ overflowAriaLabel: PropTypes.string,
87
85
  /**
88
86
  * overflowTooltipAlign: align tooltip position
89
87
  */
@@ -92,4 +90,4 @@ SimpleHeader.propTypes = {
92
90
  title: PropTypes.string
93
91
  };
94
92
 
95
- export { SimpleHeader, overflowAriaLabel_required_if_breadcrumbs_exist };
93
+ export { SimpleHeader };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright IBM Corp. 2024, 2024
2
+ * Copyright IBM Corp. 2024, 2025
3
3
  *
4
4
  * This source code is licensed under the Apache-2.0 license found in the
5
5
  * LICENSE file in the root directory of this source tree.
@@ -52,8 +52,3 @@ export interface TagOverflowProps {
52
52
  tagComponent?: string;
53
53
  }
54
54
  export declare let TagOverflow: React.ForwardRefExoticComponent<TagOverflowProps & React.RefAttributes<HTMLDivElement>>;
55
- /**
56
- * The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
57
- * @returns null if no problems
58
- */
59
- export declare const string_required_if_more_than_10_tags: (props: any, propName: any, componentName: any, location: any, propFullName: any, secret: any) => any;
@@ -14,7 +14,6 @@ import { TagOverflowModal } from './TagOverflowModal.js';
14
14
  import { TagOverflowPopover } from './TagOverflowPopover.js';
15
15
  import cx from 'classnames';
16
16
  import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
17
- import { isRequiredIf } from '../../global/js/utils/props-helper.js';
18
17
  import { pkg } from '../../settings.js';
19
18
  import { useOverflowItems } from '../../global/js/hooks/useOverflowItems/useOverflowItems.js';
20
19
 
@@ -140,17 +139,6 @@ TagOverflow = pkg.checkComponentEnabled(TagOverflow, componentName);
140
139
  TagOverflow.displayName = componentName;
141
140
  const tagTypes = Object.keys(TYPES);
142
141
 
143
- /**
144
- * The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
145
- * @returns null if no problems
146
- */
147
- const string_required_if_more_than_10_tags = isRequiredIf(PropTypes.string, _ref => {
148
- let {
149
- items
150
- } = _ref;
151
- return items?.length > allTagsModalSearchThreshold;
152
- });
153
-
154
142
  // The types and DocGen commentary for the component props,
155
143
  // in alphabetical order (for consistency).
156
144
  // See https://www.npmjs.com/package/prop-types#usage.
@@ -166,11 +154,11 @@ TagOverflow.propTypes = {
166
154
  /**
167
155
  * label text for the show all search. **Note: Required if more than 10 tags**
168
156
  */
169
- allTagsModalSearchLabel: string_required_if_more_than_10_tags,
157
+ allTagsModalSearchLabel: PropTypes.string,
170
158
  /**
171
159
  * placeholder text for the show all search. **Note: Required if more than 10 tags**
172
160
  */
173
- allTagsModalSearchPlaceholderText: string_required_if_more_than_10_tags,
161
+ allTagsModalSearchPlaceholderText: PropTypes.string,
174
162
  /**
175
163
  * portal target for the all tags modal
176
164
  */
@@ -178,7 +166,7 @@ TagOverflow.propTypes = {
178
166
  /**
179
167
  * title for the show all modal. **Note: Required if more than 10 tags**
180
168
  */
181
- allTagsModalTitle: string_required_if_more_than_10_tags,
169
+ allTagsModalTitle: PropTypes.string,
182
170
  /**
183
171
  * Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
184
172
  */
@@ -237,7 +225,7 @@ TagOverflow.propTypes = {
237
225
  *
238
226
  * **Note:** Required if more than 10 tags
239
227
  */
240
- showAllTagsLabel: string_required_if_more_than_10_tags,
228
+ showAllTagsLabel: PropTypes.string,
241
229
  /** Component definition of the items to be rendered inside TagOverflow.
242
230
  * If this is not passed, items will be rendered as Tag component
243
231
  */
@@ -245,4 +233,4 @@ TagOverflow.propTypes = {
245
233
  tagComponent: PropTypes.elementType
246
234
  };
247
235
 
248
- export { TagOverflow, string_required_if_more_than_10_tags };
236
+ export { TagOverflow };
@@ -97,10 +97,5 @@ export interface TagSetProps extends PropsWithChildren {
97
97
  tags?: TagType[];
98
98
  }
99
99
  export declare let TagSet: React.ForwardRefExoticComponent<TagSetProps & React.RefAttributes<HTMLDivElement>>;
100
- /**
101
- * The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
102
- * @returns null if no problems
103
- */
104
- export declare const string_required_if_more_than_10_tags: (props: any, propName: any, componentName: any, location: any, propFullName: any, secret: any) => any;
105
100
  declare const tagTypes: string[];
106
101
  export default TagSet;