@carbon-labs/react-ui-shell 0.87.0 → 0.88.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.
Files changed (104) hide show
  1. package/es/components/HeaderContainer.js +2 -2
  2. package/es/components/HeaderDivider.js +2 -2
  3. package/es/components/HeaderOverflowPanel.js +5 -5
  4. package/es/components/HeaderPopover.js +6 -6
  5. package/es/components/Link.js +2 -2
  6. package/es/components/Profile.js +17 -17
  7. package/es/components/SharkFinIcon.js +6 -6
  8. package/es/components/SideNav.js +10 -10
  9. package/es/components/SideNavFlyoutMenu.js +9 -9
  10. package/es/components/SideNavItems.js +5 -5
  11. package/es/components/SideNavLink.js +7 -7
  12. package/es/components/SideNavLinkPopover.js +2 -2
  13. package/es/components/SideNavMenu.js +24 -24
  14. package/es/components/SideNavMenuItem.js +7 -7
  15. package/es/components/SideNavSlot.js +4 -4
  16. package/es/components/SideNavTitle.js +3 -3
  17. package/es/components/SideNavToggle.js +7 -7
  18. package/es/components/TrialCountdown.js +3 -3
  19. package/es/internal/useId.js +2 -2
  20. package/es/internal/useIdPrefix.js +3 -3
  21. package/es/internal/usePrefix.js +3 -3
  22. package/lib/components/HeaderContainer.js +10 -10
  23. package/lib/components/HeaderDivider.js +2 -2
  24. package/lib/components/HeaderOverflowPanel.js +5 -5
  25. package/lib/components/HeaderPopover.js +9 -9
  26. package/lib/components/Link.js +3 -3
  27. package/lib/components/Profile.js +17 -17
  28. package/lib/components/SharkFinIcon.js +6 -6
  29. package/lib/components/SideNav.js +23 -23
  30. package/lib/components/SideNavFlyoutMenu.js +22 -22
  31. package/lib/components/SideNavItems.js +8 -8
  32. package/lib/components/SideNavLink.js +9 -9
  33. package/lib/components/SideNavLinkPopover.js +2 -2
  34. package/lib/components/SideNavMenu.js +42 -42
  35. package/lib/components/SideNavMenuItem.js +8 -8
  36. package/lib/components/SideNavSlot.js +4 -4
  37. package/lib/components/SideNavTitle.js +3 -3
  38. package/lib/components/SideNavToggle.js +9 -9
  39. package/lib/components/TrialCountdown.js +3 -3
  40. package/lib/es/components/HeaderContainer.d.ts +2 -2
  41. package/lib/es/components/HeaderDivider.d.ts +2 -2
  42. package/lib/es/components/HeaderOverflowPanel.d.ts +2 -2
  43. package/lib/es/components/HeaderPopover.d.ts +4 -4
  44. package/lib/es/components/Link.d.ts +3 -3
  45. package/lib/es/components/Profile.d.ts +7 -7
  46. package/lib/es/components/SharkFinIcon.d.ts +2 -2
  47. package/lib/es/components/SideNav.d.ts +4 -4
  48. package/lib/es/components/SideNavFlyoutMenu.d.ts +2 -2
  49. package/lib/es/components/SideNavItems.d.ts +2 -2
  50. package/lib/es/components/SideNavLink.d.ts +2 -2
  51. package/lib/es/components/SideNavLinkPopover.d.ts +2 -2
  52. package/lib/es/components/SideNavMenu.d.ts +2 -2
  53. package/lib/es/components/SideNavMenuItem.d.ts +2 -2
  54. package/lib/es/components/SideNavSlot.d.ts +2 -2
  55. package/lib/es/components/SideNavTitle.d.ts +3 -3
  56. package/lib/es/components/SideNavToggle.d.ts +2 -2
  57. package/lib/es/components/TrialCountdown.d.ts +2 -2
  58. package/lib/es/internal/useIdPrefix.d.ts +2 -2
  59. package/lib/es/internal/usePrefix.d.ts +2 -2
  60. package/lib/internal/useDelayedState.js +5 -5
  61. package/lib/internal/useEvent.js +4 -4
  62. package/lib/internal/useId.js +5 -5
  63. package/lib/internal/useIdPrefix.js +3 -3
  64. package/lib/internal/useMatchMedia.js +3 -3
  65. package/lib/internal/useMergedRefs.js +2 -2
  66. package/lib/internal/usePrefix.js +3 -3
  67. package/package.json +4 -6
  68. package/LICENSE +0 -201
  69. package/es/node_modules/@carbon/ibm-products/es/_virtual/_commonjsHelpers.js +0 -12
  70. package/es/node_modules/@carbon/ibm-products/es/_virtual/_rollupPluginBabelHelpers.js +0 -18
  71. package/es/node_modules/@carbon/ibm-products/es/_virtual/index.js +0 -14
  72. package/es/node_modules/@carbon/ibm-products/es/_virtual/index2.js +0 -12
  73. package/es/node_modules/@carbon/ibm-products/es/components/TooltipTrigger/TooltipTrigger.js +0 -62
  74. package/es/node_modules/@carbon/ibm-products/es/components/UserAvatar/UserAvatar.js +0 -161
  75. package/es/node_modules/@carbon/ibm-products/es/components/_Canary/Canary.js +0 -49
  76. package/es/node_modules/@carbon/ibm-products/es/global/js/package-settings.js +0 -246
  77. package/es/node_modules/@carbon/ibm-products/es/global/js/utils/devtools.js +0 -16
  78. package/es/node_modules/@carbon/ibm-products/es/global/js/utils/pconsole.js +0 -35
  79. package/es/node_modules/@carbon/ibm-products/es/node_modules/object-assign/index.js +0 -89
  80. package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/checkPropTypes.js +0 -95
  81. package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithThrowingShims.js +0 -64
  82. package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithTypeCheckers.js +0 -561
  83. package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/index.js +0 -32
  84. package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -18
  85. package/es/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/has.js +0 -17
  86. package/es/node_modules/@carbon/ibm-products/es/settings.js +0 -84
  87. package/lib/node_modules/@carbon/ibm-products/es/_virtual/_commonjsHelpers.js +0 -14
  88. package/lib/node_modules/@carbon/ibm-products/es/_virtual/_rollupPluginBabelHelpers.js +0 -20
  89. package/lib/node_modules/@carbon/ibm-products/es/_virtual/index.js +0 -19
  90. package/lib/node_modules/@carbon/ibm-products/es/_virtual/index2.js +0 -14
  91. package/lib/node_modules/@carbon/ibm-products/es/components/TooltipTrigger/TooltipTrigger.js +0 -64
  92. package/lib/node_modules/@carbon/ibm-products/es/components/UserAvatar/UserAvatar.js +0 -163
  93. package/lib/node_modules/@carbon/ibm-products/es/components/_Canary/Canary.js +0 -51
  94. package/lib/node_modules/@carbon/ibm-products/es/global/js/package-settings.js +0 -252
  95. package/lib/node_modules/@carbon/ibm-products/es/global/js/utils/devtools.js +0 -20
  96. package/lib/node_modules/@carbon/ibm-products/es/global/js/utils/pconsole.js +0 -45
  97. package/lib/node_modules/@carbon/ibm-products/es/node_modules/object-assign/index.js +0 -91
  98. package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/checkPropTypes.js +0 -97
  99. package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithThrowingShims.js +0 -66
  100. package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/factoryWithTypeCheckers.js +0 -563
  101. package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/index.js +0 -34
  102. package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -20
  103. package/lib/node_modules/@carbon/ibm-products/es/node_modules/prop-types/lib/has.js +0 -19
  104. package/lib/node_modules/@carbon/ibm-products/es/settings.js +0 -86
@@ -1,563 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 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
- var require$$0 = require('react-is');
11
- var index = require('../object-assign/index.js');
12
- var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret.js');
13
- var has = require('./lib/has.js');
14
- var checkPropTypes = require('./checkPropTypes.js');
15
-
16
- var factoryWithTypeCheckers;
17
- var hasRequiredFactoryWithTypeCheckers;
18
- function requireFactoryWithTypeCheckers() {
19
- if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
20
- hasRequiredFactoryWithTypeCheckers = 1;
21
- var ReactIs = require$$0;
22
- var assign = index.__require();
23
- var ReactPropTypesSecret$1 = /*@__PURE__*/ReactPropTypesSecret.__require();
24
- var has$1 = /*@__PURE__*/has.__require();
25
- var checkPropTypes$1 = /*@__PURE__*/checkPropTypes.__require();
26
- var printWarning = function () {};
27
- if (process.env.NODE_ENV !== 'production') {
28
- printWarning = function (text) {
29
- var message = 'Warning: ' + text;
30
- if (typeof console !== 'undefined') {
31
- console.error(message);
32
- }
33
- try {
34
- // --- Welcome to debugging React ---
35
- // This error was thrown as a convenience so that you can use this stack
36
- // to find the callsite that caused this warning to fire.
37
- throw new Error(message);
38
- } catch (x) {}
39
- };
40
- }
41
- function emptyFunctionThatReturnsNull() {
42
- return null;
43
- }
44
- factoryWithTypeCheckers = function (isValidElement, throwOnDirectAccess) {
45
- /* global Symbol */
46
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
47
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
48
-
49
- /**
50
- * Returns the iterator method function contained on the iterable object.
51
- *
52
- * Be sure to invoke the function with the iterable as context:
53
- *
54
- * var iteratorFn = getIteratorFn(myIterable);
55
- * if (iteratorFn) {
56
- * var iterator = iteratorFn.call(myIterable);
57
- * ...
58
- * }
59
- *
60
- * @param {?object} maybeIterable
61
- * @return {?function}
62
- */
63
- function getIteratorFn(maybeIterable) {
64
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
65
- if (typeof iteratorFn === 'function') {
66
- return iteratorFn;
67
- }
68
- }
69
-
70
- /**
71
- * Collection of methods that allow declaration and validation of props that are
72
- * supplied to React components. Example usage:
73
- *
74
- * var Props = require('ReactPropTypes');
75
- * var MyArticle = React.createClass({
76
- * propTypes: {
77
- * // An optional string prop named "description".
78
- * description: Props.string,
79
- *
80
- * // A required enum prop named "category".
81
- * category: Props.oneOf(['News','Photos']).isRequired,
82
- *
83
- * // A prop named "dialog" that requires an instance of Dialog.
84
- * dialog: Props.instanceOf(Dialog).isRequired
85
- * },
86
- * render: function() { ... }
87
- * });
88
- *
89
- * A more formal specification of how these methods are used:
90
- *
91
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
92
- * decl := ReactPropTypes.{type}(.isRequired)?
93
- *
94
- * Each and every declaration produces a function with the same signature. This
95
- * allows the creation of custom validation functions. For example:
96
- *
97
- * var MyLink = React.createClass({
98
- * propTypes: {
99
- * // An optional string or URI prop named "href".
100
- * href: function(props, propName, componentName) {
101
- * var propValue = props[propName];
102
- * if (propValue != null && typeof propValue !== 'string' &&
103
- * !(propValue instanceof URI)) {
104
- * return new Error(
105
- * 'Expected a string or an URI for ' + propName + ' in ' +
106
- * componentName
107
- * );
108
- * }
109
- * }
110
- * },
111
- * render: function() {...}
112
- * });
113
- *
114
- * @internal
115
- */
116
-
117
- var ANONYMOUS = '<<anonymous>>';
118
-
119
- // Important!
120
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
121
- var ReactPropTypes = {
122
- array: createPrimitiveTypeChecker('array'),
123
- bigint: createPrimitiveTypeChecker('bigint'),
124
- bool: createPrimitiveTypeChecker('boolean'),
125
- func: createPrimitiveTypeChecker('function'),
126
- number: createPrimitiveTypeChecker('number'),
127
- object: createPrimitiveTypeChecker('object'),
128
- string: createPrimitiveTypeChecker('string'),
129
- symbol: createPrimitiveTypeChecker('symbol'),
130
- any: createAnyTypeChecker(),
131
- arrayOf: createArrayOfTypeChecker,
132
- element: createElementTypeChecker(),
133
- elementType: createElementTypeTypeChecker(),
134
- instanceOf: createInstanceTypeChecker,
135
- node: createNodeChecker(),
136
- objectOf: createObjectOfTypeChecker,
137
- oneOf: createEnumTypeChecker,
138
- oneOfType: createUnionTypeChecker,
139
- shape: createShapeTypeChecker,
140
- exact: createStrictShapeTypeChecker
141
- };
142
-
143
- /**
144
- * inlined Object.is polyfill to avoid requiring consumers ship their own
145
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
146
- */
147
- /*eslint-disable no-self-compare*/
148
- function is(x, y) {
149
- // SameValue algorithm
150
- if (x === y) {
151
- // Steps 1-5, 7-10
152
- // Steps 6.b-6.e: +0 != -0
153
- return x !== 0 || 1 / x === 1 / y;
154
- } else {
155
- // Step 6.a: NaN == NaN
156
- return x !== x && y !== y;
157
- }
158
- }
159
- /*eslint-enable no-self-compare*/
160
-
161
- /**
162
- * We use an Error-like object for backward compatibility as people may call
163
- * PropTypes directly and inspect their output. However, we don't use real
164
- * Errors anymore. We don't inspect their stack anyway, and creating them
165
- * is prohibitively expensive if they are created too often, such as what
166
- * happens in oneOfType() for any type before the one that matched.
167
- */
168
- function PropTypeError(message, data) {
169
- this.message = message;
170
- this.data = data && typeof data === 'object' ? data : {};
171
- this.stack = '';
172
- }
173
- // Make `instanceof Error` still work for returned errors.
174
- PropTypeError.prototype = Error.prototype;
175
- function createChainableTypeChecker(validate) {
176
- if (process.env.NODE_ENV !== 'production') {
177
- var manualPropTypeCallCache = {};
178
- var manualPropTypeWarningCount = 0;
179
- }
180
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
181
- componentName = componentName || ANONYMOUS;
182
- propFullName = propFullName || propName;
183
- if (secret !== ReactPropTypesSecret$1) {
184
- if (throwOnDirectAccess) {
185
- // New behavior only for users of `prop-types` package
186
- var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
187
- err.name = 'Invariant Violation';
188
- throw err;
189
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
190
- // Old behavior for people using React.PropTypes
191
- var cacheKey = componentName + ':' + propName;
192
- if (!manualPropTypeCallCache[cacheKey] &&
193
- // Avoid spamming the console because they are often not actionable except for lib authors
194
- manualPropTypeWarningCount < 3) {
195
- printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
196
- manualPropTypeCallCache[cacheKey] = true;
197
- manualPropTypeWarningCount++;
198
- }
199
- }
200
- }
201
- if (props[propName] == null) {
202
- if (isRequired) {
203
- if (props[propName] === null) {
204
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
205
- }
206
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
207
- }
208
- return null;
209
- } else {
210
- return validate(props, propName, componentName, location, propFullName);
211
- }
212
- }
213
- var chainedCheckType = checkType.bind(null, false);
214
- chainedCheckType.isRequired = checkType.bind(null, true);
215
- return chainedCheckType;
216
- }
217
- function createPrimitiveTypeChecker(expectedType) {
218
- function validate(props, propName, componentName, location, propFullName, secret) {
219
- var propValue = props[propName];
220
- var propType = getPropType(propValue);
221
- if (propType !== expectedType) {
222
- // `propValue` being instance of, say, date/regexp, pass the 'object'
223
- // check, but we can offer a more precise error message here rather than
224
- // 'of type `object`'.
225
- var preciseType = getPreciseType(propValue);
226
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
227
- expectedType: expectedType
228
- });
229
- }
230
- return null;
231
- }
232
- return createChainableTypeChecker(validate);
233
- }
234
- function createAnyTypeChecker() {
235
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
236
- }
237
- function createArrayOfTypeChecker(typeChecker) {
238
- function validate(props, propName, componentName, location, propFullName) {
239
- if (typeof typeChecker !== 'function') {
240
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
241
- }
242
- var propValue = props[propName];
243
- if (!Array.isArray(propValue)) {
244
- var propType = getPropType(propValue);
245
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
246
- }
247
- for (var i = 0; i < propValue.length; i++) {
248
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret$1);
249
- if (error instanceof Error) {
250
- return error;
251
- }
252
- }
253
- return null;
254
- }
255
- return createChainableTypeChecker(validate);
256
- }
257
- function createElementTypeChecker() {
258
- function validate(props, propName, componentName, location, propFullName) {
259
- var propValue = props[propName];
260
- if (!isValidElement(propValue)) {
261
- var propType = getPropType(propValue);
262
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
263
- }
264
- return null;
265
- }
266
- return createChainableTypeChecker(validate);
267
- }
268
- function createElementTypeTypeChecker() {
269
- function validate(props, propName, componentName, location, propFullName) {
270
- var propValue = props[propName];
271
- if (!ReactIs.isValidElementType(propValue)) {
272
- var propType = getPropType(propValue);
273
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
274
- }
275
- return null;
276
- }
277
- return createChainableTypeChecker(validate);
278
- }
279
- function createInstanceTypeChecker(expectedClass) {
280
- function validate(props, propName, componentName, location, propFullName) {
281
- if (!(props[propName] instanceof expectedClass)) {
282
- var expectedClassName = expectedClass.name || ANONYMOUS;
283
- var actualClassName = getClassName(props[propName]);
284
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
285
- }
286
- return null;
287
- }
288
- return createChainableTypeChecker(validate);
289
- }
290
- function createEnumTypeChecker(expectedValues) {
291
- if (!Array.isArray(expectedValues)) {
292
- if (process.env.NODE_ENV !== 'production') {
293
- if (arguments.length > 1) {
294
- printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
295
- } else {
296
- printWarning('Invalid argument supplied to oneOf, expected an array.');
297
- }
298
- }
299
- return emptyFunctionThatReturnsNull;
300
- }
301
- function validate(props, propName, componentName, location, propFullName) {
302
- var propValue = props[propName];
303
- for (var i = 0; i < expectedValues.length; i++) {
304
- if (is(propValue, expectedValues[i])) {
305
- return null;
306
- }
307
- }
308
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
309
- var type = getPreciseType(value);
310
- if (type === 'symbol') {
311
- return String(value);
312
- }
313
- return value;
314
- });
315
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
316
- }
317
- return createChainableTypeChecker(validate);
318
- }
319
- function createObjectOfTypeChecker(typeChecker) {
320
- function validate(props, propName, componentName, location, propFullName) {
321
- if (typeof typeChecker !== 'function') {
322
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
323
- }
324
- var propValue = props[propName];
325
- var propType = getPropType(propValue);
326
- if (propType !== 'object') {
327
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
328
- }
329
- for (var key in propValue) {
330
- if (has$1(propValue, key)) {
331
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
332
- if (error instanceof Error) {
333
- return error;
334
- }
335
- }
336
- }
337
- return null;
338
- }
339
- return createChainableTypeChecker(validate);
340
- }
341
- function createUnionTypeChecker(arrayOfTypeCheckers) {
342
- if (!Array.isArray(arrayOfTypeCheckers)) {
343
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
344
- return emptyFunctionThatReturnsNull;
345
- }
346
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
347
- var checker = arrayOfTypeCheckers[i];
348
- if (typeof checker !== 'function') {
349
- printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
350
- return emptyFunctionThatReturnsNull;
351
- }
352
- }
353
- function validate(props, propName, componentName, location, propFullName) {
354
- var expectedTypes = [];
355
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
356
- var checker = arrayOfTypeCheckers[i];
357
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret$1);
358
- if (checkerResult == null) {
359
- return null;
360
- }
361
- if (checkerResult.data && has$1(checkerResult.data, 'expectedType')) {
362
- expectedTypes.push(checkerResult.data.expectedType);
363
- }
364
- }
365
- var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
366
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
367
- }
368
- return createChainableTypeChecker(validate);
369
- }
370
- function createNodeChecker() {
371
- function validate(props, propName, componentName, location, propFullName) {
372
- if (!isNode(props[propName])) {
373
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
374
- }
375
- return null;
376
- }
377
- return createChainableTypeChecker(validate);
378
- }
379
- function invalidValidatorError(componentName, location, propFullName, key, type) {
380
- return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
381
- }
382
- function createShapeTypeChecker(shapeTypes) {
383
- function validate(props, propName, componentName, location, propFullName) {
384
- var propValue = props[propName];
385
- var propType = getPropType(propValue);
386
- if (propType !== 'object') {
387
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
388
- }
389
- for (var key in shapeTypes) {
390
- var checker = shapeTypes[key];
391
- if (typeof checker !== 'function') {
392
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
393
- }
394
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
395
- if (error) {
396
- return error;
397
- }
398
- }
399
- return null;
400
- }
401
- return createChainableTypeChecker(validate);
402
- }
403
- function createStrictShapeTypeChecker(shapeTypes) {
404
- function validate(props, propName, componentName, location, propFullName) {
405
- var propValue = props[propName];
406
- var propType = getPropType(propValue);
407
- if (propType !== 'object') {
408
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
409
- }
410
- // We need to check all keys in case some are required but missing from props.
411
- var allKeys = assign({}, props[propName], shapeTypes);
412
- for (var key in allKeys) {
413
- var checker = shapeTypes[key];
414
- if (has$1(shapeTypes, key) && typeof checker !== 'function') {
415
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
416
- }
417
- if (!checker) {
418
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
419
- }
420
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret$1);
421
- if (error) {
422
- return error;
423
- }
424
- }
425
- return null;
426
- }
427
- return createChainableTypeChecker(validate);
428
- }
429
- function isNode(propValue) {
430
- switch (typeof propValue) {
431
- case 'number':
432
- case 'string':
433
- case 'undefined':
434
- return true;
435
- case 'boolean':
436
- return !propValue;
437
- case 'object':
438
- if (Array.isArray(propValue)) {
439
- return propValue.every(isNode);
440
- }
441
- if (propValue === null || isValidElement(propValue)) {
442
- return true;
443
- }
444
- var iteratorFn = getIteratorFn(propValue);
445
- if (iteratorFn) {
446
- var iterator = iteratorFn.call(propValue);
447
- var step;
448
- if (iteratorFn !== propValue.entries) {
449
- while (!(step = iterator.next()).done) {
450
- if (!isNode(step.value)) {
451
- return false;
452
- }
453
- }
454
- } else {
455
- // Iterator will provide entry [k,v] tuples rather than values.
456
- while (!(step = iterator.next()).done) {
457
- var entry = step.value;
458
- if (entry) {
459
- if (!isNode(entry[1])) {
460
- return false;
461
- }
462
- }
463
- }
464
- }
465
- } else {
466
- return false;
467
- }
468
- return true;
469
- default:
470
- return false;
471
- }
472
- }
473
- function isSymbol(propType, propValue) {
474
- // Native Symbol.
475
- if (propType === 'symbol') {
476
- return true;
477
- }
478
-
479
- // falsy value can't be a Symbol
480
- if (!propValue) {
481
- return false;
482
- }
483
-
484
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
485
- if (propValue['@@toStringTag'] === 'Symbol') {
486
- return true;
487
- }
488
-
489
- // Fallback for non-spec compliant Symbols which are polyfilled.
490
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
491
- return true;
492
- }
493
- return false;
494
- }
495
-
496
- // Equivalent of `typeof` but with special handling for array and regexp.
497
- function getPropType(propValue) {
498
- var propType = typeof propValue;
499
- if (Array.isArray(propValue)) {
500
- return 'array';
501
- }
502
- if (propValue instanceof RegExp) {
503
- // Old webkits (at least until Android 4.0) return 'function' rather than
504
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
505
- // passes PropTypes.object.
506
- return 'object';
507
- }
508
- if (isSymbol(propType, propValue)) {
509
- return 'symbol';
510
- }
511
- return propType;
512
- }
513
-
514
- // This handles more types than `getPropType`. Only used for error messages.
515
- // See `createPrimitiveTypeChecker`.
516
- function getPreciseType(propValue) {
517
- if (typeof propValue === 'undefined' || propValue === null) {
518
- return '' + propValue;
519
- }
520
- var propType = getPropType(propValue);
521
- if (propType === 'object') {
522
- if (propValue instanceof Date) {
523
- return 'date';
524
- } else if (propValue instanceof RegExp) {
525
- return 'regexp';
526
- }
527
- }
528
- return propType;
529
- }
530
-
531
- // Returns a string that is postfixed to a warning about an invalid type.
532
- // For example, "undefined" or "of type array"
533
- function getPostfixForTypeWarning(value) {
534
- var type = getPreciseType(value);
535
- switch (type) {
536
- case 'array':
537
- case 'object':
538
- return 'an ' + type;
539
- case 'boolean':
540
- case 'date':
541
- case 'regexp':
542
- return 'a ' + type;
543
- default:
544
- return type;
545
- }
546
- }
547
-
548
- // Returns class name of the object, if any.
549
- function getClassName(propValue) {
550
- if (!propValue.constructor || !propValue.constructor.name) {
551
- return ANONYMOUS;
552
- }
553
- return propValue.constructor.name;
554
- }
555
- ReactPropTypes.checkPropTypes = checkPropTypes$1;
556
- ReactPropTypes.resetWarningCache = checkPropTypes$1.resetWarningCache;
557
- ReactPropTypes.PropTypes = ReactPropTypes;
558
- return ReactPropTypes;
559
- };
560
- return factoryWithTypeCheckers;
561
- }
562
-
563
- exports.__require = requireFactoryWithTypeCheckers;
@@ -1,34 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 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
- var index2 = require('../../_virtual/index2.js');
11
- var require$$0 = require('react-is');
12
- var factoryWithTypeCheckers = require('./factoryWithTypeCheckers.js');
13
- var factoryWithThrowingShims = require('./factoryWithThrowingShims.js');
14
-
15
- var hasRequiredPropTypes;
16
- function requirePropTypes() {
17
- if (hasRequiredPropTypes) return index2.__module.exports;
18
- hasRequiredPropTypes = 1;
19
- if (process.env.NODE_ENV !== 'production') {
20
- var ReactIs = require$$0;
21
-
22
- // By explicitly using `prop-types` you are opting into new development behavior.
23
- // http://fb.me/prop-types-in-prod
24
- var throwOnDirectAccess = true;
25
- index2.__module.exports = /*@__PURE__*/factoryWithTypeCheckers.__require()(ReactIs.isElement, throwOnDirectAccess);
26
- } else {
27
- // By explicitly using `prop-types` you are opting into new production behavior.
28
- // http://fb.me/prop-types-in-prod
29
- index2.__module.exports = /*@__PURE__*/factoryWithThrowingShims.__require()();
30
- }
31
- return index2.__module.exports;
32
- }
33
-
34
- exports.__require = requirePropTypes;
@@ -1,20 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 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
- var ReactPropTypesSecret_1;
11
- var hasRequiredReactPropTypesSecret;
12
- function requireReactPropTypesSecret() {
13
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
14
- hasRequiredReactPropTypesSecret = 1;
15
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
16
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
17
- return ReactPropTypesSecret_1;
18
- }
19
-
20
- exports.__require = requireReactPropTypesSecret;
@@ -1,19 +0,0 @@
1
- /**
2
- * Copyright IBM Corp. 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
- var has;
11
- var hasRequiredHas;
12
- function requireHas() {
13
- if (hasRequiredHas) return has;
14
- hasRequiredHas = 1;
15
- has = Function.call.bind(Object.prototype.hasOwnProperty);
16
- return has;
17
- }
18
-
19
- exports.__require = requireHas;