@carbon/ibm-products 2.73.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 +2 -2
- 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 @@ var React = require('react');
|
|
13
13
|
var cx = require('classnames');
|
14
14
|
var settings = require('../../settings.js');
|
15
15
|
var pconsole = require('../../global/js/utils/pconsole.js');
|
16
|
-
var propsHelper = require('../../global/js/utils/props-helper.js');
|
17
16
|
var react = require('@carbon/react');
|
18
17
|
var BreadcrumbWithOverflow = require('../BreadcrumbWithOverflow/BreadcrumbWithOverflow.js');
|
19
18
|
|
@@ -63,7 +62,6 @@ const SimpleHeader = _ref => {
|
|
63
62
|
className: cx(`${blockClass}__title`)
|
64
63
|
}, title));
|
65
64
|
};
|
66
|
-
const overflowAriaLabel_required_if_breadcrumbs_exist = propsHelper.isRequiredIf(index.default.string, props => props.breadcrumbs?.length > 0);
|
67
65
|
SimpleHeader.propTypes = {
|
68
66
|
/** Header breadcrumbs */
|
69
67
|
breadcrumbs: index.default.arrayOf(index.default.shape({
|
@@ -85,7 +83,7 @@ SimpleHeader.propTypes = {
|
|
85
83
|
/** A prop to omit the trailing slash for the breadcrumbs */
|
86
84
|
noTrailingSlash: index.default.bool,
|
87
85
|
/** Label for open/close overflow button used for breadcrumb items that do not fit */
|
88
|
-
overflowAriaLabel:
|
86
|
+
overflowAriaLabel: index.default.string,
|
89
87
|
/**
|
90
88
|
* overflowTooltipAlign: align tooltip position
|
91
89
|
*/
|
@@ -95,4 +93,3 @@ SimpleHeader.propTypes = {
|
|
95
93
|
};
|
96
94
|
|
97
95
|
exports.SimpleHeader = SimpleHeader;
|
98
|
-
exports.overflowAriaLabel_required_if_breadcrumbs_exist = overflowAriaLabel_required_if_breadcrumbs_exist;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright IBM Corp. 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;
|
@@ -16,7 +16,6 @@ var TagOverflowModal = require('./TagOverflowModal.js');
|
|
16
16
|
var TagOverflowPopover = require('./TagOverflowPopover.js');
|
17
17
|
var cx = require('classnames');
|
18
18
|
var devtools = require('../../global/js/utils/devtools.js');
|
19
|
-
var propsHelper = require('../../global/js/utils/props-helper.js');
|
20
19
|
var settings = require('../../settings.js');
|
21
20
|
var useOverflowItems = require('../../global/js/hooks/useOverflowItems/useOverflowItems.js');
|
22
21
|
|
@@ -142,17 +141,6 @@ exports.TagOverflow = settings.pkg.checkComponentEnabled(exports.TagOverflow, co
|
|
142
141
|
exports.TagOverflow.displayName = componentName;
|
143
142
|
const tagTypes = Object.keys(constants.TYPES);
|
144
143
|
|
145
|
-
/**
|
146
|
-
* The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
|
147
|
-
* @returns null if no problems
|
148
|
-
*/
|
149
|
-
const string_required_if_more_than_10_tags = propsHelper.isRequiredIf(index.default.string, _ref => {
|
150
|
-
let {
|
151
|
-
items
|
152
|
-
} = _ref;
|
153
|
-
return items?.length > allTagsModalSearchThreshold;
|
154
|
-
});
|
155
|
-
|
156
144
|
// The types and DocGen commentary for the component props,
|
157
145
|
// in alphabetical order (for consistency).
|
158
146
|
// See https://www.npmjs.com/package/prop-types#usage.
|
@@ -168,11 +156,11 @@ exports.TagOverflow.propTypes = {
|
|
168
156
|
/**
|
169
157
|
* label text for the show all search. **Note: Required if more than 10 tags**
|
170
158
|
*/
|
171
|
-
allTagsModalSearchLabel:
|
159
|
+
allTagsModalSearchLabel: index.default.string,
|
172
160
|
/**
|
173
161
|
* placeholder text for the show all search. **Note: Required if more than 10 tags**
|
174
162
|
*/
|
175
|
-
allTagsModalSearchPlaceholderText:
|
163
|
+
allTagsModalSearchPlaceholderText: index.default.string,
|
176
164
|
/**
|
177
165
|
* portal target for the all tags modal
|
178
166
|
*/
|
@@ -180,7 +168,7 @@ exports.TagOverflow.propTypes = {
|
|
180
168
|
/**
|
181
169
|
* title for the show all modal. **Note: Required if more than 10 tags**
|
182
170
|
*/
|
183
|
-
allTagsModalTitle:
|
171
|
+
allTagsModalTitle: index.default.string,
|
184
172
|
/**
|
185
173
|
* Will auto-align the popover on first render if it is not visible. This prop is currently experimental and is subject to future changes.
|
186
174
|
*/
|
@@ -239,12 +227,10 @@ exports.TagOverflow.propTypes = {
|
|
239
227
|
*
|
240
228
|
* **Note:** Required if more than 10 tags
|
241
229
|
*/
|
242
|
-
showAllTagsLabel:
|
230
|
+
showAllTagsLabel: index.default.string,
|
243
231
|
/** Component definition of the items to be rendered inside TagOverflow.
|
244
232
|
* If this is not passed, items will be rendered as Tag component
|
245
233
|
*/
|
246
234
|
//@ts-ignore
|
247
235
|
tagComponent: index.default.elementType
|
248
236
|
};
|
249
|
-
|
250
|
-
exports.string_required_if_more_than_10_tags = string_required_if_more_than_10_tags;
|
@@ -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;
|
@@ -15,7 +15,6 @@ var TagSetModal = require('./TagSetModal.js');
|
|
15
15
|
var TagSetOverflow = require('./TagSetOverflow.js');
|
16
16
|
var cx = require('classnames');
|
17
17
|
var devtools = require('../../global/js/utils/devtools.js');
|
18
|
-
var propsHelper = require('../../global/js/utils/props-helper.js');
|
19
18
|
var settings = require('../../settings.js');
|
20
19
|
var useResizeObserver = require('../../global/js/hooks/useResizeObserver.js');
|
21
20
|
|
@@ -246,17 +245,6 @@ exports.TagSet = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
246
245
|
// Return a placeholder if not released and not enabled by feature flag
|
247
246
|
exports.TagSet = settings.pkg.checkComponentEnabled(exports.TagSet, componentName);
|
248
247
|
|
249
|
-
/**
|
250
|
-
* The strings shown in the showAllModal are only shown if we have more than allTagsModalSearchLThreshold
|
251
|
-
* @returns null if no problems
|
252
|
-
*/
|
253
|
-
const string_required_if_more_than_10_tags = propsHelper.isRequiredIf(index.default.string, _ref4 => {
|
254
|
-
let {
|
255
|
-
tags
|
256
|
-
} = _ref4;
|
257
|
-
return tags && tags.length > allTagsModalSearchThreshold;
|
258
|
-
});
|
259
|
-
|
260
248
|
// copied from carbon-components-react/src/components/Tag/Tag.js for DocGen
|
261
249
|
const TYPES = {
|
262
250
|
red: 'Red',
|
@@ -366,5 +354,3 @@ exports.TagSet.propTypes = {
|
|
366
354
|
}))
|
367
355
|
};
|
368
356
|
exports.TagSet.displayName = componentName;
|
369
|
-
|
370
|
-
exports.string_required_if_more_than_10_tags = string_required_if_more_than_10_tags;
|
@@ -137,12 +137,7 @@ exports.UserAvatar.propTypes = {
|
|
137
137
|
* When passing the image prop use the imageDescription prop to describe the image for screen reader.
|
138
138
|
*/
|
139
139
|
/**@ts-ignore */
|
140
|
-
imageDescription: index.default.string
|
141
|
-
let {
|
142
|
-
image
|
143
|
-
} = _ref;
|
144
|
-
return !!image;
|
145
|
-
}),
|
140
|
+
imageDescription: index.default.string,
|
146
141
|
/**
|
147
142
|
* 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.
|
148
143
|
*/
|
@@ -143,12 +143,7 @@ exports.UserProfileImage.propTypes = {
|
|
143
143
|
* When passing the image prop use the imageDescription prop to describe the image for screen reader.
|
144
144
|
*/
|
145
145
|
/**@ts-ignore */
|
146
|
-
imageDescription: index.default.string
|
147
|
-
let {
|
148
|
-
image
|
149
|
-
} = _ref;
|
150
|
-
return !!image;
|
151
|
-
}),
|
146
|
+
imageDescription: index.default.string,
|
152
147
|
/**
|
153
148
|
* 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.
|
154
149
|
*/
|
@@ -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
|
-
}
|
@@ -7,17 +7,14 @@
|
|
7
7
|
|
8
8
|
'use strict';
|
9
9
|
|
10
|
-
require('react');
|
11
|
-
var index = require('../../../_virtual/index.js');
|
12
10
|
var pconsole = require('./pconsole.js');
|
13
11
|
|
14
|
-
// Copyright IBM Corp. 2020,
|
12
|
+
// Copyright IBM Corp. 2020, 2025
|
15
13
|
//
|
16
14
|
// This source code is licensed under the Apache-2.0 license found in the
|
17
15
|
// LICENSE file in the root directory of this source tree.
|
18
16
|
//
|
19
17
|
|
20
|
-
|
21
18
|
// helper functions for component props
|
22
19
|
|
23
20
|
/**
|
@@ -151,41 +148,6 @@ const allPropTypes = pconsole.default.shimIfProduction(arrayOfTypeCheckers => {
|
|
151
148
|
return checkType;
|
152
149
|
});
|
153
150
|
|
154
|
-
/**
|
155
|
-
* A prop-types validation function that takes a type checkers and a condition
|
156
|
-
* function and invokes either the type checker or the isRequired variant of
|
157
|
-
* the type checker according to whether the condition function returns false
|
158
|
-
* or true when called with the full set of props. This can be useful to make
|
159
|
-
* a prop conditionally required. The function also has a decorate function
|
160
|
-
* which can be used to add isRequiredIf to any existing type which already has
|
161
|
-
* an isRequired variant, and this is automatically applied to the simple type
|
162
|
-
* checkers in PropTypes when this props-helper module is imported. The second
|
163
|
-
* example produces better results with DocGen and Storybook.
|
164
|
-
*
|
165
|
-
* Examples:
|
166
|
-
*
|
167
|
-
* MyComponent1.propTypes = {
|
168
|
-
* showFoo: PropTypes.bool,
|
169
|
-
* fooLabel: isRequiredIf(PropTypes.string, ({ showFoo }) => showFoo),
|
170
|
-
* }
|
171
|
-
*
|
172
|
-
* MyComponent2.propTypes = {
|
173
|
-
* showBar: PropTypes.bool,
|
174
|
-
* barLabel: PropTypes.string.isRequired.if(({ showBar }) => showBar),
|
175
|
-
* }
|
176
|
-
*
|
177
|
-
*/
|
178
|
-
const isRequiredIf = (checker, conditionFn) => (props, propName, componentName, location, propFullName, secret) => (conditionFn(props) ? checker.isRequired : checker)(props, propName, componentName, location, propFullName, secret);
|
179
|
-
isRequiredIf.decorate = checker => {
|
180
|
-
checker.isRequired.if = pconsole.default.isProduction ? pconsole.default.noop : isRequiredIf.bind(null, checker);
|
181
|
-
};
|
182
|
-
for (const checker in index.default) {
|
183
|
-
if (index.default[checker].isRequired) {
|
184
|
-
isRequiredIf.decorate(index.default[checker]);
|
185
|
-
}
|
186
|
-
}
|
187
|
-
|
188
151
|
exports.allPropTypes = allPropTypes;
|
189
152
|
exports.deprecateProp = deprecateProp;
|
190
|
-
exports.isRequiredIf = isRequiredIf;
|
191
153
|
exports.prepareProps = prepareProps;
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@carbon/ibm-products",
|
3
3
|
"description": "Carbon for IBM Products",
|
4
|
-
"version": "2.73.0",
|
4
|
+
"version": "2.73.1-rc.0",
|
5
5
|
"license": "Apache-2.0",
|
6
6
|
"main": "lib/index.js",
|
7
7
|
"module": "es/index.js",
|
@@ -131,5 +131,5 @@
|
|
131
131
|
"react": "^16.8.6 || ^17.0.1 || ^18.2.0 || ^19.0.0",
|
132
132
|
"react-dom": "^16.8.6 || ^17.0.1 || ^18.2.0 || ^19.0.0"
|
133
133
|
},
|
134
|
-
"gitHead": "
|
134
|
+
"gitHead": "46d1b5fa030eec15d4838e4fa9e153d732dc75c7"
|
135
135
|
}
|