@carbon/ibm-products 2.73.0-rc.0 → 2.73.1-rc.0
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.
- package/es/components/APIKeyModal/APIKeyModal.js +9 -28
- package/es/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -12
- package/es/components/CreateFullPage/CreateFullPage.js +2 -2
- package/es/components/CreateFullPage/CreateFullPageStep.d.ts +1 -1
- package/es/components/CreateFullPage/CreateFullPageStep.js +1 -6
- package/es/components/CreateTearsheet/CreateTearsheetStep.d.ts +1 -1
- package/es/components/CreateTearsheet/CreateTearsheetStep.js +2 -12
- package/es/components/EditSidePanel/EditSidePanel.d.ts +1 -1
- package/es/components/EditSidePanel/EditSidePanel.js +1 -6
- package/es/components/EditTearsheet/EditTearsheetForm.d.ts +1 -1
- package/es/components/EditTearsheet/EditTearsheetForm.js +2 -12
- package/es/components/EmptyStates/EmptyState.d.ts +1 -1
- package/es/components/EmptyStates/EmptyState.js +1 -6
- package/es/components/PageHeader/PageHeader.js +11 -50
- package/es/components/PageHeader/PageHeaderTitle.js +6 -12
- package/es/components/SidePanel/SidePanel.js +2 -12
- package/es/components/SimpleHeader/SimpleHeader.d.ts +7 -8
- package/es/components/SimpleHeader/SimpleHeader.js +2 -4
- package/es/components/TagOverflow/TagOverflow.d.ts +1 -6
- package/es/components/TagOverflow/TagOverflow.js +5 -17
- package/es/components/TagSet/TagSet.d.ts +0 -5
- package/es/components/TagSet/TagSet.js +1 -13
- package/es/components/UserAvatar/UserAvatar.d.ts +1 -1
- package/es/components/UserAvatar/UserAvatar.js +1 -6
- package/es/components/UserProfileImage/UserProfileImage.d.ts +1 -1
- package/es/components/UserProfileImage/UserProfileImage.js +1 -6
- package/es/global/js/utils/props-helper.d.ts +0 -6
- package/es/global/js/utils/props-helper.js +2 -39
- package/lib/components/APIKeyModal/APIKeyModal.js +9 -28
- package/lib/components/BreadcrumbWithOverflow/BreadcrumbWithOverflow.js +2 -12
- package/lib/components/CreateFullPage/CreateFullPage.js +1 -1
- package/lib/components/CreateFullPage/CreateFullPageStep.d.ts +1 -1
- package/lib/components/CreateFullPage/CreateFullPageStep.js +1 -6
- package/lib/components/CreateTearsheet/CreateTearsheetStep.d.ts +1 -1
- package/lib/components/CreateTearsheet/CreateTearsheetStep.js +2 -12
- package/lib/components/EditSidePanel/EditSidePanel.d.ts +1 -1
- package/lib/components/EditSidePanel/EditSidePanel.js +1 -6
- package/lib/components/EditTearsheet/EditTearsheetForm.d.ts +1 -1
- package/lib/components/EditTearsheet/EditTearsheetForm.js +2 -12
- package/lib/components/EmptyStates/EmptyState.d.ts +1 -1
- package/lib/components/EmptyStates/EmptyState.js +1 -6
- package/lib/components/PageHeader/PageHeader.js +10 -49
- package/lib/components/PageHeader/PageHeaderTitle.js +5 -12
- package/lib/components/SidePanel/SidePanel.js +2 -12
- package/lib/components/SimpleHeader/SimpleHeader.d.ts +7 -8
- package/lib/components/SimpleHeader/SimpleHeader.js +1 -4
- package/lib/components/TagOverflow/TagOverflow.d.ts +1 -6
- package/lib/components/TagOverflow/TagOverflow.js +4 -18
- package/lib/components/TagSet/TagSet.d.ts +0 -5
- package/lib/components/TagSet/TagSet.js +0 -14
- package/lib/components/UserAvatar/UserAvatar.d.ts +1 -1
- package/lib/components/UserAvatar/UserAvatar.js +1 -6
- package/lib/components/UserProfileImage/UserProfileImage.d.ts +1 -1
- package/lib/components/UserProfileImage/UserProfileImage.js +1 -6
- package/lib/global/js/utils/props-helper.d.ts +0 -6
- package/lib/global/js/utils/props-helper.js +1 -39
- package/package.json +5 -5
- package/es/global/js/utils/unwrap-if-fragment.d.ts +0 -6
- package/lib/global/js/utils/unwrap-if-fragment.d.ts +0 -6
@@ -13,7 +13,6 @@ import { TagSetModal } from './TagSetModal.js';
|
|
13
13
|
import { TagSetOverflow } from './TagSetOverflow.js';
|
14
14
|
import cx from 'classnames';
|
15
15
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
16
|
-
import { isRequiredIf } from '../../global/js/utils/props-helper.js';
|
17
16
|
import { pkg } from '../../settings.js';
|
18
17
|
import { useResizeObserver } from '../../global/js/hooks/useResizeObserver.js';
|
19
18
|
|
@@ -244,17 +243,6 @@ let TagSet = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
244
243
|
// Return a placeholder if not released and not enabled by feature flag
|
245
244
|
TagSet = pkg.checkComponentEnabled(TagSet, componentName);
|
246
245
|
|
247
|
-
/**
|
248
|
-
* The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
|
249
|
-
* @returns null if no problems
|
250
|
-
*/
|
251
|
-
const string_required_if_more_than_10_tags = isRequiredIf(PropTypes.string, _ref4 => {
|
252
|
-
let {
|
253
|
-
tags
|
254
|
-
} = _ref4;
|
255
|
-
return tags && tags.length > allTagsModalSearchThreshold;
|
256
|
-
});
|
257
|
-
|
258
246
|
// copied from carbon-components-react/src/components/Tag/Tag.js for DocGen
|
259
247
|
const TYPES = {
|
260
248
|
red: 'Red',
|
@@ -365,4 +353,4 @@ TagSet.propTypes = {
|
|
365
353
|
};
|
366
354
|
TagSet.displayName = componentName;
|
367
355
|
|
368
|
-
export { TagSet
|
356
|
+
export { TagSet };
|
@@ -135,12 +135,7 @@ UserAvatar.propTypes = {
|
|
135
135
|
* When passing the image prop use the imageDescription prop to describe the image for screen reader.
|
136
136
|
*/
|
137
137
|
/**@ts-ignore */
|
138
|
-
imageDescription: PropTypes.string
|
139
|
-
let {
|
140
|
-
image
|
141
|
-
} = _ref;
|
142
|
-
return !!image;
|
143
|
-
}),
|
138
|
+
imageDescription: PropTypes.string,
|
144
139
|
/**
|
145
140
|
* When passing the name prop, either send the initials to be used or the user's full name. The first two capital letters of the user's name will be used as the name.
|
146
141
|
*/
|
@@ -141,12 +141,7 @@ UserProfileImage.propTypes = {
|
|
141
141
|
* When passing the image prop use the imageDescription prop to describe the image for screen reader.
|
142
142
|
*/
|
143
143
|
/**@ts-ignore */
|
144
|
-
imageDescription: PropTypes.string
|
145
|
-
let {
|
146
|
-
image
|
147
|
-
} = _ref;
|
148
|
-
return !!image;
|
149
|
-
}),
|
144
|
+
imageDescription: PropTypes.string,
|
150
145
|
/**
|
151
146
|
* When passing the initials prop, either send the initials to be used or the user's display name. The first two capital letters of the display name will be used as the initials.
|
152
147
|
*/
|
@@ -1,8 +1,6 @@
|
|
1
1
|
export function prepareProps(...values: {} | "" | [""]): {};
|
2
|
-
export function deprecatePropUsage(validator: any, deprecated: any, additionalInfo: any): (props: any, propName: any, comp: any, loc: any, propFullName: any, secret: any) => any;
|
3
2
|
export function deprecateProp(validator: any, additionalInfo: any): (props: any, propName: any, comp: any, loc: any, propFullName: any, secret: any) => any;
|
4
3
|
export function getDeprecatedArgTypes(deprecatedProps: any): {};
|
5
|
-
export function extractShapesArray(items: any): any;
|
6
4
|
/**
|
7
5
|
* A prop-types validation function that takes an array of type checkers and
|
8
6
|
* requires prop values to satisfy all of the type checkers. This can be useful
|
@@ -31,7 +29,3 @@ export function extractShapesArray(items: any): any;
|
|
31
29
|
* }
|
32
30
|
*/
|
33
31
|
export const allPropTypes: any;
|
34
|
-
export function isRequiredIf(checker: any, conditionFn: any): (props: any, propName: any, componentName: any, location: any, propFullName: any, secret: any) => any;
|
35
|
-
export namespace isRequiredIf {
|
36
|
-
function decorate(checker: any): void;
|
37
|
-
}
|
@@ -5,17 +5,14 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import 'react';
|
9
|
-
import PropTypes from '../../../_virtual/index.js';
|
10
8
|
import pconsole from './pconsole.js';
|
11
9
|
|
12
|
-
// Copyright IBM Corp. 2020,
|
10
|
+
// Copyright IBM Corp. 2020, 2025
|
13
11
|
//
|
14
12
|
// This source code is licensed under the Apache-2.0 license found in the
|
15
13
|
// LICENSE file in the root directory of this source tree.
|
16
14
|
//
|
17
15
|
|
18
|
-
|
19
16
|
// helper functions for component props
|
20
17
|
|
21
18
|
/**
|
@@ -149,38 +146,4 @@ const allPropTypes = pconsole.shimIfProduction(arrayOfTypeCheckers => {
|
|
149
146
|
return checkType;
|
150
147
|
});
|
151
148
|
|
152
|
-
|
153
|
-
* A prop-types validation function that takes a type checkers and a condition
|
154
|
-
* function and invokes either the type checker or the isRequired variant of
|
155
|
-
* the type checker according to whether the condition function returns false
|
156
|
-
* or true when called with the full set of props. This can be useful to make
|
157
|
-
* a prop conditionally required. The function also has a decorate function
|
158
|
-
* which can be used to add isRequiredIf to any existing type which already has
|
159
|
-
* an isRequired variant, and this is automatically applied to the simple type
|
160
|
-
* checkers in PropTypes when this props-helper module is imported. The second
|
161
|
-
* example produces better results with DocGen and Storybook.
|
162
|
-
*
|
163
|
-
* Examples:
|
164
|
-
*
|
165
|
-
* MyComponent1.propTypes = {
|
166
|
-
* showFoo: PropTypes.bool,
|
167
|
-
* fooLabel: isRequiredIf(PropTypes.string, ({ showFoo }) => showFoo),
|
168
|
-
* }
|
169
|
-
*
|
170
|
-
* MyComponent2.propTypes = {
|
171
|
-
* showBar: PropTypes.bool,
|
172
|
-
* barLabel: PropTypes.string.isRequired.if(({ showBar }) => showBar),
|
173
|
-
* }
|
174
|
-
*
|
175
|
-
*/
|
176
|
-
const isRequiredIf = (checker, conditionFn) => (props, propName, componentName, location, propFullName, secret) => (conditionFn(props) ? checker.isRequired : checker)(props, propName, componentName, location, propFullName, secret);
|
177
|
-
isRequiredIf.decorate = checker => {
|
178
|
-
checker.isRequired.if = pconsole.isProduction ? pconsole.noop : isRequiredIf.bind(null, checker);
|
179
|
-
};
|
180
|
-
for (const checker in PropTypes) {
|
181
|
-
if (PropTypes[checker].isRequired) {
|
182
|
-
isRequiredIf.decorate(PropTypes[checker]);
|
183
|
-
}
|
184
|
-
}
|
185
|
-
|
186
|
-
export { allPropTypes, deprecateProp, isRequiredIf, prepareProps };
|
149
|
+
export { allPropTypes, deprecateProp, prepareProps };
|
@@ -17,7 +17,6 @@ var APIKeyDownloader = require('./APIKeyDownloader.js');
|
|
17
17
|
var settings = require('../../settings.js');
|
18
18
|
var usePortalTarget = require('../../global/js/hooks/usePortalTarget.js');
|
19
19
|
var devtools = require('../../global/js/utils/devtools.js');
|
20
|
-
var propsHelper = require('../../global/js/utils/props-helper.js');
|
21
20
|
var uuidv4 = require('../../global/js/utils/uuidv4.js');
|
22
21
|
var useFocus = require('../../global/js/hooks/useFocus.js');
|
23
22
|
var usePreviousValue = require('../../global/js/hooks/usePreviousValue.js');
|
@@ -311,24 +310,6 @@ exports.APIKeyModal = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
311
310
|
disabled: isPrimaryButtonDisabled()
|
312
311
|
}), getPrimaryButtonText())))));
|
313
312
|
});
|
314
|
-
const customStepsRequiredProps = type => propsHelper.isRequiredIf(type, _ref2 => {
|
315
|
-
let {
|
316
|
-
customSteps
|
317
|
-
} = _ref2;
|
318
|
-
return customSteps && customSteps.length > 1;
|
319
|
-
});
|
320
|
-
const editRequiredProps = type => propsHelper.isRequiredIf(type, _ref3 => {
|
321
|
-
let {
|
322
|
-
editing
|
323
|
-
} = _ref3;
|
324
|
-
return editing;
|
325
|
-
});
|
326
|
-
const downloadRequiredProps = type => propsHelper.isRequiredIf(type, _ref4 => {
|
327
|
-
let {
|
328
|
-
hasDownloadLink
|
329
|
-
} = _ref4;
|
330
|
-
return hasDownloadLink;
|
331
|
-
});
|
332
313
|
|
333
314
|
// Return a placeholder if not released and not enabled by feature flag
|
334
315
|
exports.APIKeyModal = settings.pkg.checkComponentEnabled(exports.APIKeyModal, componentName);
|
@@ -406,31 +387,31 @@ exports.APIKeyModal.propTypes = {
|
|
406
387
|
/**
|
407
388
|
* designates the name of downloadable json file with the key. if not specified will default to 'apikey'
|
408
389
|
*/
|
409
|
-
downloadFileName:
|
390
|
+
downloadFileName: index.default.string,
|
410
391
|
/**
|
411
392
|
* designates the file type for the downloadable key
|
412
393
|
*/
|
413
|
-
downloadFileType:
|
394
|
+
downloadFileType: index.default.oneOf(['txt', 'json']),
|
414
395
|
/**
|
415
396
|
* aria-label for the download link
|
416
397
|
*/
|
417
|
-
downloadLinkLabel:
|
398
|
+
downloadLinkLabel: index.default.string,
|
418
399
|
/**
|
419
400
|
* anchor text for the download link
|
420
401
|
*/
|
421
|
-
downloadLinkText:
|
402
|
+
downloadLinkText: index.default.string,
|
422
403
|
/**
|
423
404
|
* text for the edit button
|
424
405
|
*/
|
425
|
-
editButtonText:
|
406
|
+
editButtonText: index.default.string,
|
426
407
|
/**
|
427
408
|
* designates if the edit request was successful
|
428
409
|
*/
|
429
|
-
editSuccess:
|
410
|
+
editSuccess: index.default.bool,
|
430
411
|
/**
|
431
412
|
* title for a successful edit
|
432
413
|
*/
|
433
|
-
editSuccessMessage:
|
414
|
+
editSuccessMessage: index.default.string,
|
434
415
|
/**
|
435
416
|
* designates if the modal is in the edit mode
|
436
417
|
*/
|
@@ -513,7 +494,7 @@ exports.APIKeyModal.propTypes = {
|
|
513
494
|
/**
|
514
495
|
* text that displays in the primary button when using custom steps to indicate to the user that there is a next step
|
515
496
|
*/
|
516
|
-
nextStepButtonText:
|
497
|
+
nextStepButtonText: index.default.string,
|
517
498
|
/**
|
518
499
|
* handler for on modal close
|
519
500
|
*/
|
@@ -542,7 +523,7 @@ exports.APIKeyModal.propTypes = {
|
|
542
523
|
/**
|
543
524
|
* text that displays in the secondary button when using custom steps to indicate to the user that there is a previous step
|
544
525
|
*/
|
545
|
-
previousStepButtonText:
|
526
|
+
previousStepButtonText: index.default.string,
|
546
527
|
/**
|
547
528
|
* label text that's displayed when hovering over visibility toggler to show key
|
548
529
|
*/
|
@@ -302,12 +302,7 @@ exports.BreadcrumbWithOverflow.propTypes = {
|
|
302
302
|
/**
|
303
303
|
* A string based alternative to the children, required only if children is not of type string
|
304
304
|
*/
|
305
|
-
title: index.default.string
|
306
|
-
let {
|
307
|
-
label
|
308
|
-
} = _ref5;
|
309
|
-
return typeof label !== 'string';
|
310
|
-
})
|
305
|
+
title: index.default.string
|
311
306
|
})),
|
312
307
|
/**
|
313
308
|
* className
|
@@ -328,12 +323,7 @@ exports.BreadcrumbWithOverflow.propTypes = {
|
|
328
323
|
/**
|
329
324
|
* overflowAriaLabel label for open close button overflow used for breadcrumb items that do not fit.
|
330
325
|
*/
|
331
|
-
overflowAriaLabel: index.default.string
|
332
|
-
let {
|
333
|
-
breadcrumbs
|
334
|
-
} = _ref6;
|
335
|
-
return breadcrumbs.length > 1;
|
336
|
-
}),
|
326
|
+
overflowAriaLabel: index.default.string,
|
337
327
|
/**
|
338
328
|
* overflowTooltipAlign: align tooltip position
|
339
329
|
*/
|
@@ -255,7 +255,7 @@ exports.CreateFullPage.propTypes = {
|
|
255
255
|
/**
|
256
256
|
* Label for open/close overflow button used for breadcrumb items that do not fit
|
257
257
|
*/
|
258
|
-
breadcrumbsOverflowAriaLabel:
|
258
|
+
breadcrumbsOverflowAriaLabel: index.default.string,
|
259
259
|
/**
|
260
260
|
* The cancel button text
|
261
261
|
*/
|
@@ -152,12 +152,7 @@ exports.CreateFullPageStep.propTypes = {
|
|
152
152
|
* 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.
|
153
153
|
*/
|
154
154
|
/**@ts-ignore */
|
155
|
-
fieldsetLegendText: index.default.string
|
156
|
-
let {
|
157
|
-
hasFieldset
|
158
|
-
} = _ref2;
|
159
|
-
return hasFieldset === true;
|
160
|
-
}),
|
155
|
+
fieldsetLegendText: index.default.string,
|
161
156
|
/**
|
162
157
|
* This optional prop will render your form content inside of a fieldset html element
|
163
158
|
*/
|
@@ -203,24 +203,14 @@ exports.CreateTearsheetStep.propTypes = {
|
|
203
203
|
* This is the required legend id that appears as the aria-labelledby of fieldset for accessibility purposes.
|
204
204
|
*/
|
205
205
|
/**@ts-ignore*/
|
206
|
-
fieldsetLegendId: index.default.node
|
207
|
-
let {
|
208
|
-
hasFieldset
|
209
|
-
} = _ref2;
|
210
|
-
return !!hasFieldset;
|
211
|
-
}),
|
206
|
+
fieldsetLegendId: index.default.node,
|
212
207
|
/**
|
213
208
|
* This is the required legend text that appears above a fieldset html element for accessibility purposes.
|
214
209
|
* 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.
|
215
210
|
* Otherwise, use CSS to hide/remove this label text.
|
216
211
|
*/
|
217
212
|
/**@ts-ignore*/
|
218
|
-
fieldsetLegendText: index.default.string
|
219
|
-
let {
|
220
|
-
hasFieldset
|
221
|
-
} = _ref3;
|
222
|
-
return !!hasFieldset;
|
223
|
-
}),
|
213
|
+
fieldsetLegendText: index.default.string,
|
224
214
|
/**
|
225
215
|
* This optional prop will render your form content inside of a fieldset html element
|
226
216
|
* and is defaulted to true.
|
@@ -171,12 +171,7 @@ exports.EditSidePanel.propTypes = {
|
|
171
171
|
* This prop is required when using the `slideIn` variant of the side panel.
|
172
172
|
*/
|
173
173
|
/**@ts-ignore*/
|
174
|
-
selectorPageContent: index.default.string
|
175
|
-
let {
|
176
|
-
slideIn
|
177
|
-
} = _ref2;
|
178
|
-
return slideIn;
|
179
|
-
}),
|
174
|
+
selectorPageContent: index.default.string,
|
180
175
|
/**
|
181
176
|
* Specifies which DOM element in the form should be focused.
|
182
177
|
*/
|
@@ -91,24 +91,14 @@ exports.EditTearsheetForm.propTypes = {
|
|
91
91
|
* This is the required legend id that appears as the aria-labelledby of fieldset for accessibility purposes.
|
92
92
|
*/
|
93
93
|
/**@ts-ignore */
|
94
|
-
fieldsetLegendId: index.default.node
|
95
|
-
let {
|
96
|
-
hasFieldset
|
97
|
-
} = _ref2;
|
98
|
-
return !!hasFieldset;
|
99
|
-
}),
|
94
|
+
fieldsetLegendId: index.default.node,
|
100
95
|
/**
|
101
96
|
* This is the required legend text that appears above a fieldset html element for accessibility purposes.
|
102
97
|
* 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.
|
103
98
|
* Otherwise, use CSS to hide/remove this label text.
|
104
99
|
*/
|
105
100
|
/**@ts-ignore */
|
106
|
-
fieldsetLegendText: index.default.string
|
107
|
-
let {
|
108
|
-
hasFieldset
|
109
|
-
} = _ref3;
|
110
|
-
return !!hasFieldset;
|
111
|
-
}),
|
101
|
+
fieldsetLegendText: index.default.string,
|
112
102
|
/**
|
113
103
|
* This optional prop will render your form content inside of a fieldset html element
|
114
104
|
* and is defaulted to true.
|
@@ -106,12 +106,7 @@ exports.EmptyState.propTypes = {
|
|
106
106
|
* The alt text for custom provided illustrations
|
107
107
|
*/
|
108
108
|
/**@ts-ignore*/
|
109
|
-
illustrationDescription: index.default.string
|
110
|
-
let {
|
111
|
-
illustration
|
112
|
-
} = _ref2;
|
113
|
-
return illustration;
|
114
|
-
}),
|
109
|
+
illustrationDescription: index.default.string,
|
115
110
|
/**
|
116
111
|
* Designates the position of the illustration relative to the content
|
117
112
|
*/
|
@@ -311,8 +311,6 @@ exports.PageHeader = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
311
311
|
}, [actionBarItems, withoutBackground, breadcrumbs, headerRef, metrics.breadcrumbRowHeight, metrics.headerHeight, navigation, scrollYValue, hasCollapseHeaderToggle, tags]);
|
312
312
|
React.useEffect(() => {
|
313
313
|
// only has toggle if requested and withoutBackground is unset/falsy
|
314
|
-
// NOTE: prop-types isRequired.if for the expand and collapse
|
315
|
-
// icon descriptions depends on the this.
|
316
314
|
setHasCollapseButton(hasCollapseHeaderToggle && !withoutBackground || false);
|
317
315
|
}, [withoutBackground, hasCollapseHeaderToggle]);
|
318
316
|
React.useEffect(() => {
|
@@ -593,12 +591,7 @@ exports.PageHeader.propTypes = {
|
|
593
591
|
* NOTE: This prop is required if actionBarItems are supplied
|
594
592
|
*/
|
595
593
|
/**@ts-ignore */
|
596
|
-
actionBarOverflowAriaLabel: index.default.string
|
597
|
-
let {
|
598
|
-
actionBarItems
|
599
|
-
} = _ref7;
|
600
|
-
return actionBarItems && actionBarItems.length > 0;
|
601
|
-
}),
|
594
|
+
actionBarOverflowAriaLabel: index.default.string,
|
602
595
|
/**
|
603
596
|
* When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
|
604
597
|
* menu being shown. If in the overflow menu there is still insufficient space this label is used in a dialog showing
|
@@ -606,7 +599,7 @@ exports.PageHeader.propTypes = {
|
|
606
599
|
*
|
607
600
|
* **Note: Required if more than 10 tags**
|
608
601
|
*/
|
609
|
-
allTagsModalSearchLabel:
|
602
|
+
allTagsModalSearchLabel: index.default.string,
|
610
603
|
/**
|
611
604
|
* When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
|
612
605
|
* menu being shown. If in the overflow menu there is still insufficient space this placeholder is used in a dialog
|
@@ -614,7 +607,7 @@ exports.PageHeader.propTypes = {
|
|
614
607
|
*
|
615
608
|
* **Note: Required if more than 10 tags**
|
616
609
|
*/
|
617
|
-
allTagsModalSearchPlaceholderText:
|
610
|
+
allTagsModalSearchPlaceholderText: index.default.string,
|
618
611
|
/**
|
619
612
|
* When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
|
620
613
|
* menu being shown. If in the overflow menu there is still insufficient space this title is used in a dialog showing
|
@@ -622,18 +615,13 @@ exports.PageHeader.propTypes = {
|
|
622
615
|
*
|
623
616
|
* **Note: Required if more than 10 tags**
|
624
617
|
*/
|
625
|
-
allTagsModalTitle:
|
618
|
+
allTagsModalTitle: index.default.string,
|
626
619
|
/**
|
627
620
|
* If the user supplies breadcrumbs then this property is required.
|
628
621
|
* It is used in an overflow menu when there is insufficient space to display all breadcrumbs inline.
|
629
622
|
*/
|
630
623
|
/**@ts-ignore */
|
631
|
-
breadcrumbOverflowAriaLabel: index.default.string
|
632
|
-
let {
|
633
|
-
breadcrumbs
|
634
|
-
} = _ref8;
|
635
|
-
return breadcrumbs && breadcrumbs.length > 0;
|
636
|
-
}),
|
624
|
+
breadcrumbOverflowAriaLabel: index.default.string,
|
637
625
|
/**
|
638
626
|
* align breadcrumb overflow tooltip
|
639
627
|
*/
|
@@ -671,12 +659,7 @@ exports.PageHeader.propTypes = {
|
|
671
659
|
* A text version of the `label` for display, required if `label` is not a string.
|
672
660
|
*/
|
673
661
|
/**@ts-ignore */
|
674
|
-
title: index.default.string
|
675
|
-
let {
|
676
|
-
label
|
677
|
-
} = _ref9;
|
678
|
-
return typeof label !== 'string';
|
679
|
-
})
|
662
|
+
title: index.default.string
|
680
663
|
})),
|
681
664
|
/**
|
682
665
|
* A zone for placing high-level, client content above the page tabs.
|
@@ -701,13 +684,7 @@ exports.PageHeader.propTypes = {
|
|
701
684
|
* required for both the expend and collapse states of the button component used.
|
702
685
|
*/
|
703
686
|
/**@ts-ignore */
|
704
|
-
collapseHeaderIconDescription: index.default.string
|
705
|
-
let {
|
706
|
-
withoutBackground,
|
707
|
-
hasCollapseHeaderToggle
|
708
|
-
} = _ref10;
|
709
|
-
return !withoutBackground && hasCollapseHeaderToggle;
|
710
|
-
}),
|
687
|
+
collapseHeaderIconDescription: index.default.string,
|
711
688
|
/**
|
712
689
|
* The title row typically starts below the breadcrumb row. This option
|
713
690
|
* preCollapses it into the breadcrumb row.
|
@@ -723,13 +700,7 @@ exports.PageHeader.propTypes = {
|
|
723
700
|
* required for both the expend and collapse states of the button component used.
|
724
701
|
*/
|
725
702
|
/**@ts-ignore */
|
726
|
-
expandHeaderIconDescription: index.default.string
|
727
|
-
let {
|
728
|
-
withoutBackground,
|
729
|
-
hasCollapseHeaderToggle
|
730
|
-
} = _ref11;
|
731
|
-
return !withoutBackground && hasCollapseHeaderToggle;
|
732
|
-
}),
|
703
|
+
expandHeaderIconDescription: index.default.string,
|
733
704
|
/**
|
734
705
|
* The PageHeader is hosted in a Carbon grid, this value is passed through to the Carbon grid fullWidth prop.
|
735
706
|
* 'xl' is used to override the grid width setting. Can be used with narrowGrid: true to get the largest size.
|
@@ -798,12 +769,7 @@ exports.PageHeader.propTypes = {
|
|
798
769
|
* NOTE: This prop is required if pageActions are supplied
|
799
770
|
*/
|
800
771
|
/**@ts-ignore */
|
801
|
-
pageActionsOverflowLabel: index.default.node
|
802
|
-
let {
|
803
|
-
pageActions
|
804
|
-
} = _ref12;
|
805
|
-
return pageActions && pageActions.length > 0 && !pageActions.content;
|
806
|
-
}),
|
772
|
+
pageActionsOverflowLabel: index.default.node,
|
807
773
|
/**
|
808
774
|
* When tags are supplied there may not be sufficient space to display all of the tags. This results in an overflow
|
809
775
|
* menu being shown. If in the overflow menu there is still insufficient space this label is used to offer a
|
@@ -811,7 +777,7 @@ exports.PageHeader.propTypes = {
|
|
811
777
|
*
|
812
778
|
* **Note: Required if more than 10 tags**
|
813
779
|
*/
|
814
|
-
showAllTagsLabel:
|
780
|
+
showAllTagsLabel: index.default.string,
|
815
781
|
/**
|
816
782
|
* Sitting just below the title is this optional subtitle that provides additional context to
|
817
783
|
* identify the current page.
|
@@ -866,18 +832,13 @@ exports.PageHeader.propTypes = {
|
|
866
832
|
loading: index.default.bool,
|
867
833
|
// inline edit version properties
|
868
834
|
editableLabel: index.default.string,
|
869
|
-
// .isRequired.if(editInPlaceRequired),
|
870
835
|
id: index.default.string,
|
871
|
-
// .isRequired.if(editInPlaceRequired),
|
872
836
|
onCancel: index.default.func,
|
873
837
|
onChange: index.default.func,
|
874
838
|
onSave: index.default.func,
|
875
839
|
cancelDescription: index.default.string,
|
876
|
-
//.isRequired.if(editInPlaceRequired),
|
877
840
|
editDescription: index.default.string,
|
878
|
-
// .isRequired.if(editInPlaceRequired),
|
879
841
|
saveDescription: index.default.string,
|
880
|
-
//.isRequired.if(editInPlaceRequired),
|
881
842
|
tooltipAlignment: index.default.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right'])
|
882
843
|
// Update docgen if changed
|
883
844
|
}), index.default.string, index.default.shape({
|
@@ -95,12 +95,6 @@ const PageHeaderTitle = _ref => {
|
|
95
95
|
title: titleText
|
96
96
|
}, titleInnards);
|
97
97
|
};
|
98
|
-
const editInPlaceRequired = _ref2 => {
|
99
|
-
let {
|
100
|
-
onSave
|
101
|
-
} = _ref2;
|
102
|
-
return !!onSave;
|
103
|
-
};
|
104
98
|
PageHeaderTitle.propTypes = {
|
105
99
|
// passed from page header
|
106
100
|
blockClass: index.default.string.isRequired,
|
@@ -134,13 +128,13 @@ PageHeaderTitle.propTypes = {
|
|
134
128
|
icon: index.default.oneOfType([index.default.func, index.default.object]),
|
135
129
|
loading: index.default.bool,
|
136
130
|
// inline edit version properties
|
137
|
-
editDescription: index.default.string
|
138
|
-
editableLabel: index.default.string
|
139
|
-
id: index.default.string
|
131
|
+
editDescription: index.default.string,
|
132
|
+
editableLabel: index.default.string,
|
133
|
+
id: index.default.string,
|
140
134
|
onChange: index.default.func,
|
141
135
|
onSave: index.default.func,
|
142
|
-
cancelDescription: index.default.string
|
143
|
-
saveDescription: index.default.string
|
136
|
+
cancelDescription: index.default.string,
|
137
|
+
saveDescription: index.default.string,
|
144
138
|
tooltipAlignment: index.default.oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right'])
|
145
139
|
// Update docgen if changed
|
146
140
|
}), index.default.string, index.default.shape({
|
@@ -151,4 +145,3 @@ PageHeaderTitle.propTypes = {
|
|
151
145
|
};
|
152
146
|
|
153
147
|
exports.PageHeaderTitle = PageHeaderTitle;
|
154
|
-
exports.editInPlaceRequired = editInPlaceRequired;
|
@@ -699,12 +699,7 @@ SidePanel.propTypes = {
|
|
699
699
|
* This prop is required when using the `slideIn` variant of the side panel.
|
700
700
|
*/
|
701
701
|
/**@ts-ignore*/
|
702
|
-
selectorPageContent: index.default.string
|
703
|
-
let {
|
704
|
-
slideIn
|
705
|
-
} = _ref2;
|
706
|
-
return slideIn;
|
707
|
-
}),
|
702
|
+
selectorPageContent: index.default.string,
|
708
703
|
/**
|
709
704
|
* Specify a CSS selector that matches the DOM element that should
|
710
705
|
* be focused when the side panel opens
|
@@ -729,12 +724,7 @@ SidePanel.propTypes = {
|
|
729
724
|
* Sets the title text
|
730
725
|
*/
|
731
726
|
/**@ts-ignore*/
|
732
|
-
title: index.default.string
|
733
|
-
let {
|
734
|
-
labelText
|
735
|
-
} = _ref3;
|
736
|
-
return labelText;
|
737
|
-
}),
|
727
|
+
title: index.default.string,
|
738
728
|
...deprecatedProps
|
739
729
|
};
|
740
730
|
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
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
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';
|