@carbon/ibm-products 2.68.0 → 2.69.0-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.
Files changed (146) hide show
  1. package/css/carbon.css +382 -74
  2. package/css/carbon.css.map +1 -1
  3. package/css/index-full-carbon.css +524 -116
  4. package/css/index-full-carbon.css.map +1 -1
  5. package/css/index-full-carbon.min.css +1 -1
  6. package/css/index-full-carbon.min.css.map +1 -1
  7. package/css/index-without-carbon-released-only.css +126 -42
  8. package/css/index-without-carbon-released-only.css.map +1 -1
  9. package/css/index-without-carbon-released-only.min.css +1 -1
  10. package/css/index-without-carbon-released-only.min.css.map +1 -1
  11. package/css/index-without-carbon.css +142 -42
  12. package/css/index-without-carbon.css.map +1 -1
  13. package/css/index-without-carbon.min.css +1 -1
  14. package/css/index-without-carbon.min.css.map +1 -1
  15. package/css/index.css +185 -50
  16. package/css/index.css.map +1 -1
  17. package/css/index.min.css +1 -1
  18. package/css/index.min.css.map +1 -1
  19. package/es/_virtual/_commonjsHelpers.js +3 -1
  20. package/es/_virtual/index2.js +6 -2
  21. package/es/_virtual/index3.js +10 -0
  22. package/es/components/AddSelect/AddSelectColumn.js +41 -18
  23. package/es/components/AddSelect/AddSelectSort.js +15 -16
  24. package/es/components/AddSelect/types/index.d.ts +1 -1
  25. package/es/components/Card/Card.d.ts +2 -2
  26. package/es/components/Card/Card.js +7 -4
  27. package/es/components/Coachmark/Coachmark.d.ts +43 -0
  28. package/es/components/Coachmark/Coachmark.js +49 -33
  29. package/es/components/Coachmark/CoachmarkOverlay.js +6 -0
  30. package/es/components/Coachmark/index.d.ts +1 -0
  31. package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +11 -0
  32. package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +19 -11
  33. package/es/components/CoachmarkButton/CoachmarkButton.js +7 -0
  34. package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +6 -0
  35. package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +7 -0
  36. package/es/components/Datagrid/Datagrid/DatagridContent.js +7 -5
  37. package/es/components/Datagrid/Datagrid/DatagridRow.d.ts +1 -1
  38. package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
  39. package/es/components/Datagrid/Datagrid/DatagridToolbar.d.ts +1 -1
  40. package/es/components/Datagrid/Datagrid/DatagridToolbar.js +8 -7
  41. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  42. package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
  43. package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +4 -3
  44. package/es/components/Datagrid/useNestedRowExpander.js +4 -2
  45. package/es/components/Datagrid/useOnRowClick.d.ts +1 -1
  46. package/es/components/Datagrid/useOnRowClick.js +6 -4
  47. package/es/components/Datagrid/useRowExpander.js +4 -2
  48. package/es/components/Datagrid/useSelectRows.d.ts +1 -1
  49. package/es/components/Datagrid/useSelectRows.js +4 -3
  50. package/es/components/Datagrid/useSortableColumns.d.ts +1 -1
  51. package/es/components/Datagrid/useSortableColumns.js +6 -5
  52. package/es/components/EditInPlace/EditInPlace.d.ts +1 -1
  53. package/es/components/EditInPlace/EditInPlace.js +4 -3
  54. package/es/components/EmptyStates/EmptyStateContent.d.ts +30 -1
  55. package/es/components/EmptyStates/EmptyStateContent.js +2 -2
  56. package/es/components/ExportModal/ExportModal.js +7 -5
  57. package/es/components/FeatureFlags/index.d.ts +31 -12
  58. package/es/components/FeatureFlags/index.js +46 -15
  59. package/es/components/InterstitialScreen/InterstitialScreenBody.js +3 -2
  60. package/es/components/InterstitialScreen/InterstitialScreenFooter.js +5 -2
  61. package/es/components/InterstitialScreen/InterstitialScreenHeader.js +3 -1
  62. package/es/components/ProductiveCard/ProductiveCard.d.ts +1 -1
  63. package/es/components/ScrollGradient/ScrollGradient.js +9 -7
  64. package/es/components/SidePanel/SidePanel.js +74 -0
  65. package/es/components/SidePanel/constants.d.ts +14 -8
  66. package/es/components/SidePanel/constants.js +1 -1
  67. package/es/components/SidePanel/resizer/Resizer.d.ts +21 -0
  68. package/es/components/SidePanel/resizer/Resizer.js +271 -0
  69. package/es/components/TruncatedList/TruncatedList.d.ts +1 -1
  70. package/es/components/TruncatedList/TruncatedList.js +4 -3
  71. package/es/feature-flags.js +5 -1
  72. package/es/index.js +1 -0
  73. package/es/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/es/index.js +3 -3
  74. package/es/node_modules/@carbon/icons-react/es/Icon.js +1 -1
  75. package/es/node_modules/@carbon/icons-react/es/generated/bucket-10.js +816 -808
  76. package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +615 -637
  77. package/es/node_modules/lodash.debounce/index.js +367 -0
  78. package/es/node_modules/prop-types/index.js +1 -1
  79. package/es/settings.js +1 -4
  80. package/lib/_virtual/_commonjsHelpers.js +3 -0
  81. package/lib/_virtual/index2.js +8 -2
  82. package/lib/_virtual/index3.js +12 -0
  83. package/lib/components/AddSelect/AddSelectColumn.js +40 -17
  84. package/lib/components/AddSelect/AddSelectSort.js +13 -14
  85. package/lib/components/AddSelect/types/index.d.ts +1 -1
  86. package/lib/components/Card/Card.d.ts +2 -2
  87. package/lib/components/Card/Card.js +7 -4
  88. package/lib/components/Coachmark/Coachmark.d.ts +43 -0
  89. package/lib/components/Coachmark/Coachmark.js +50 -32
  90. package/lib/components/Coachmark/CoachmarkOverlay.js +6 -0
  91. package/lib/components/Coachmark/index.d.ts +1 -0
  92. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +11 -0
  93. package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +19 -11
  94. package/lib/components/CoachmarkButton/CoachmarkButton.js +7 -0
  95. package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +6 -0
  96. package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +7 -0
  97. package/lib/components/Datagrid/Datagrid/DatagridContent.js +5 -3
  98. package/lib/components/Datagrid/Datagrid/DatagridRow.d.ts +1 -1
  99. package/lib/components/Datagrid/Datagrid/DatagridRow.js +2 -1
  100. package/lib/components/Datagrid/Datagrid/DatagridToolbar.d.ts +1 -1
  101. package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +6 -5
  102. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
  103. package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +3 -2
  104. package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +2 -1
  105. package/lib/components/Datagrid/useNestedRowExpander.js +3 -1
  106. package/lib/components/Datagrid/useOnRowClick.d.ts +1 -1
  107. package/lib/components/Datagrid/useOnRowClick.js +5 -3
  108. package/lib/components/Datagrid/useRowExpander.js +3 -1
  109. package/lib/components/Datagrid/useSelectRows.d.ts +1 -1
  110. package/lib/components/Datagrid/useSelectRows.js +2 -1
  111. package/lib/components/Datagrid/useSortableColumns.d.ts +1 -1
  112. package/lib/components/Datagrid/useSortableColumns.js +4 -3
  113. package/lib/components/EditInPlace/EditInPlace.d.ts +1 -1
  114. package/lib/components/EditInPlace/EditInPlace.js +2 -1
  115. package/lib/components/EmptyStates/EmptyStateContent.d.ts +30 -1
  116. package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
  117. package/lib/components/ExportModal/ExportModal.js +5 -3
  118. package/lib/components/FeatureFlags/index.d.ts +31 -12
  119. package/lib/components/FeatureFlags/index.js +46 -15
  120. package/lib/components/InterstitialScreen/InterstitialScreenBody.js +3 -2
  121. package/lib/components/InterstitialScreen/InterstitialScreenFooter.js +5 -2
  122. package/lib/components/InterstitialScreen/InterstitialScreenHeader.js +3 -1
  123. package/lib/components/ProductiveCard/ProductiveCard.d.ts +1 -1
  124. package/lib/components/ScrollGradient/ScrollGradient.js +8 -6
  125. package/lib/components/SidePanel/SidePanel.js +74 -0
  126. package/lib/components/SidePanel/constants.d.ts +14 -8
  127. package/lib/components/SidePanel/constants.js +1 -1
  128. package/lib/components/SidePanel/resizer/Resizer.d.ts +21 -0
  129. package/lib/components/SidePanel/resizer/Resizer.js +277 -0
  130. package/lib/components/TruncatedList/TruncatedList.d.ts +1 -1
  131. package/lib/components/TruncatedList/TruncatedList.js +2 -1
  132. package/lib/feature-flags.js +5 -1
  133. package/lib/index.js +1 -0
  134. package/lib/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/es/index.js +3 -3
  135. package/lib/node_modules/@carbon/icons-react/es/Icon.js +1 -1
  136. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-10.js +839 -831
  137. package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +621 -643
  138. package/lib/node_modules/lodash.debounce/index.js +369 -0
  139. package/lib/node_modules/prop-types/index.js +1 -1
  140. package/lib/settings.js +0 -4
  141. package/package.json +15 -15
  142. package/scss/components/AddSelect/_add-select.scss +12 -13
  143. package/scss/components/SidePanel/_side-panel-variables.scss +1 -5
  144. package/scss/components/SidePanel/_side-panel.scss +129 -12
  145. package/scss/global/decorators/_side-panel-decorator.scss +36 -8
  146. package/telemetry.yml +17 -0
@@ -0,0 +1,367 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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
+ import { commonjsGlobal } from '../../_virtual/_commonjsHelpers.js';
9
+
10
+ var lodash_debounce;
11
+ var hasRequiredLodash_debounce;
12
+ function requireLodash_debounce() {
13
+ if (hasRequiredLodash_debounce) return lodash_debounce;
14
+ hasRequiredLodash_debounce = 1;
15
+ /** Used as the `TypeError` message for "Functions" methods. */
16
+ var FUNC_ERROR_TEXT = 'Expected a function';
17
+
18
+ /** Used as references for various `Number` constants. */
19
+ var NAN = 0 / 0;
20
+
21
+ /** `Object#toString` result references. */
22
+ var symbolTag = '[object Symbol]';
23
+
24
+ /** Used to match leading and trailing whitespace. */
25
+ var reTrim = /^\s+|\s+$/g;
26
+
27
+ /** Used to detect bad signed hexadecimal string values. */
28
+ var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
29
+
30
+ /** Used to detect binary string values. */
31
+ var reIsBinary = /^0b[01]+$/i;
32
+
33
+ /** Used to detect octal string values. */
34
+ var reIsOctal = /^0o[0-7]+$/i;
35
+
36
+ /** Built-in method references without a dependency on `root`. */
37
+ var freeParseInt = parseInt;
38
+
39
+ /** Detect free variable `global` from Node.js. */
40
+ var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
41
+
42
+ /** Detect free variable `self`. */
43
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
44
+
45
+ /** Used as a reference to the global object. */
46
+ var root = freeGlobal || freeSelf || Function('return this')();
47
+
48
+ /** Used for built-in method references. */
49
+ var objectProto = Object.prototype;
50
+
51
+ /**
52
+ * Used to resolve the
53
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
54
+ * of values.
55
+ */
56
+ var objectToString = objectProto.toString;
57
+
58
+ /* Built-in method references for those with the same name as other `lodash` methods. */
59
+ var nativeMax = Math.max,
60
+ nativeMin = Math.min;
61
+
62
+ /**
63
+ * Gets the timestamp of the number of milliseconds that have elapsed since
64
+ * the Unix epoch (1 January 1970 00:00:00 UTC).
65
+ *
66
+ * @static
67
+ * @memberOf _
68
+ * @since 2.4.0
69
+ * @category Date
70
+ * @returns {number} Returns the timestamp.
71
+ * @example
72
+ *
73
+ * _.defer(function(stamp) {
74
+ * console.log(_.now() - stamp);
75
+ * }, _.now());
76
+ * // => Logs the number of milliseconds it took for the deferred invocation.
77
+ */
78
+ var now = function () {
79
+ return root.Date.now();
80
+ };
81
+
82
+ /**
83
+ * Creates a debounced function that delays invoking `func` until after `wait`
84
+ * milliseconds have elapsed since the last time the debounced function was
85
+ * invoked. The debounced function comes with a `cancel` method to cancel
86
+ * delayed `func` invocations and a `flush` method to immediately invoke them.
87
+ * Provide `options` to indicate whether `func` should be invoked on the
88
+ * leading and/or trailing edge of the `wait` timeout. The `func` is invoked
89
+ * with the last arguments provided to the debounced function. Subsequent
90
+ * calls to the debounced function return the result of the last `func`
91
+ * invocation.
92
+ *
93
+ * **Note:** If `leading` and `trailing` options are `true`, `func` is
94
+ * invoked on the trailing edge of the timeout only if the debounced function
95
+ * is invoked more than once during the `wait` timeout.
96
+ *
97
+ * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
98
+ * until to the next tick, similar to `setTimeout` with a timeout of `0`.
99
+ *
100
+ * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
101
+ * for details over the differences between `_.debounce` and `_.throttle`.
102
+ *
103
+ * @static
104
+ * @memberOf _
105
+ * @since 0.1.0
106
+ * @category Function
107
+ * @param {Function} func The function to debounce.
108
+ * @param {number} [wait=0] The number of milliseconds to delay.
109
+ * @param {Object} [options={}] The options object.
110
+ * @param {boolean} [options.leading=false]
111
+ * Specify invoking on the leading edge of the timeout.
112
+ * @param {number} [options.maxWait]
113
+ * The maximum time `func` is allowed to be delayed before it's invoked.
114
+ * @param {boolean} [options.trailing=true]
115
+ * Specify invoking on the trailing edge of the timeout.
116
+ * @returns {Function} Returns the new debounced function.
117
+ * @example
118
+ *
119
+ * // Avoid costly calculations while the window size is in flux.
120
+ * jQuery(window).on('resize', _.debounce(calculateLayout, 150));
121
+ *
122
+ * // Invoke `sendMail` when clicked, debouncing subsequent calls.
123
+ * jQuery(element).on('click', _.debounce(sendMail, 300, {
124
+ * 'leading': true,
125
+ * 'trailing': false
126
+ * }));
127
+ *
128
+ * // Ensure `batchLog` is invoked once after 1 second of debounced calls.
129
+ * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
130
+ * var source = new EventSource('/stream');
131
+ * jQuery(source).on('message', debounced);
132
+ *
133
+ * // Cancel the trailing debounced invocation.
134
+ * jQuery(window).on('popstate', debounced.cancel);
135
+ */
136
+ function debounce(func, wait, options) {
137
+ var lastArgs,
138
+ lastThis,
139
+ maxWait,
140
+ result,
141
+ timerId,
142
+ lastCallTime,
143
+ lastInvokeTime = 0,
144
+ leading = false,
145
+ maxing = false,
146
+ trailing = true;
147
+ if (typeof func != 'function') {
148
+ throw new TypeError(FUNC_ERROR_TEXT);
149
+ }
150
+ wait = toNumber(wait) || 0;
151
+ if (isObject(options)) {
152
+ leading = !!options.leading;
153
+ maxing = 'maxWait' in options;
154
+ maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
155
+ trailing = 'trailing' in options ? !!options.trailing : trailing;
156
+ }
157
+ function invokeFunc(time) {
158
+ var args = lastArgs,
159
+ thisArg = lastThis;
160
+ lastArgs = lastThis = undefined;
161
+ lastInvokeTime = time;
162
+ result = func.apply(thisArg, args);
163
+ return result;
164
+ }
165
+ function leadingEdge(time) {
166
+ // Reset any `maxWait` timer.
167
+ lastInvokeTime = time;
168
+ // Start the timer for the trailing edge.
169
+ timerId = setTimeout(timerExpired, wait);
170
+ // Invoke the leading edge.
171
+ return leading ? invokeFunc(time) : result;
172
+ }
173
+ function remainingWait(time) {
174
+ var timeSinceLastCall = time - lastCallTime,
175
+ timeSinceLastInvoke = time - lastInvokeTime,
176
+ result = wait - timeSinceLastCall;
177
+ return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
178
+ }
179
+ function shouldInvoke(time) {
180
+ var timeSinceLastCall = time - lastCallTime,
181
+ timeSinceLastInvoke = time - lastInvokeTime;
182
+
183
+ // Either this is the first call, activity has stopped and we're at the
184
+ // trailing edge, the system time has gone backwards and we're treating
185
+ // it as the trailing edge, or we've hit the `maxWait` limit.
186
+ return lastCallTime === undefined || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
187
+ }
188
+ function timerExpired() {
189
+ var time = now();
190
+ if (shouldInvoke(time)) {
191
+ return trailingEdge(time);
192
+ }
193
+ // Restart the timer.
194
+ timerId = setTimeout(timerExpired, remainingWait(time));
195
+ }
196
+ function trailingEdge(time) {
197
+ timerId = undefined;
198
+
199
+ // Only invoke if we have `lastArgs` which means `func` has been
200
+ // debounced at least once.
201
+ if (trailing && lastArgs) {
202
+ return invokeFunc(time);
203
+ }
204
+ lastArgs = lastThis = undefined;
205
+ return result;
206
+ }
207
+ function cancel() {
208
+ if (timerId !== undefined) {
209
+ clearTimeout(timerId);
210
+ }
211
+ lastInvokeTime = 0;
212
+ lastArgs = lastCallTime = lastThis = timerId = undefined;
213
+ }
214
+ function flush() {
215
+ return timerId === undefined ? result : trailingEdge(now());
216
+ }
217
+ function debounced() {
218
+ var time = now(),
219
+ isInvoking = shouldInvoke(time);
220
+ lastArgs = arguments;
221
+ lastThis = this;
222
+ lastCallTime = time;
223
+ if (isInvoking) {
224
+ if (timerId === undefined) {
225
+ return leadingEdge(lastCallTime);
226
+ }
227
+ if (maxing) {
228
+ // Handle invocations in a tight loop.
229
+ timerId = setTimeout(timerExpired, wait);
230
+ return invokeFunc(lastCallTime);
231
+ }
232
+ }
233
+ if (timerId === undefined) {
234
+ timerId = setTimeout(timerExpired, wait);
235
+ }
236
+ return result;
237
+ }
238
+ debounced.cancel = cancel;
239
+ debounced.flush = flush;
240
+ return debounced;
241
+ }
242
+
243
+ /**
244
+ * Checks if `value` is the
245
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
246
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
247
+ *
248
+ * @static
249
+ * @memberOf _
250
+ * @since 0.1.0
251
+ * @category Lang
252
+ * @param {*} value The value to check.
253
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
254
+ * @example
255
+ *
256
+ * _.isObject({});
257
+ * // => true
258
+ *
259
+ * _.isObject([1, 2, 3]);
260
+ * // => true
261
+ *
262
+ * _.isObject(_.noop);
263
+ * // => true
264
+ *
265
+ * _.isObject(null);
266
+ * // => false
267
+ */
268
+ function isObject(value) {
269
+ var type = typeof value;
270
+ return !!value && (type == 'object' || type == 'function');
271
+ }
272
+
273
+ /**
274
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
275
+ * and has a `typeof` result of "object".
276
+ *
277
+ * @static
278
+ * @memberOf _
279
+ * @since 4.0.0
280
+ * @category Lang
281
+ * @param {*} value The value to check.
282
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
283
+ * @example
284
+ *
285
+ * _.isObjectLike({});
286
+ * // => true
287
+ *
288
+ * _.isObjectLike([1, 2, 3]);
289
+ * // => true
290
+ *
291
+ * _.isObjectLike(_.noop);
292
+ * // => false
293
+ *
294
+ * _.isObjectLike(null);
295
+ * // => false
296
+ */
297
+ function isObjectLike(value) {
298
+ return !!value && typeof value == 'object';
299
+ }
300
+
301
+ /**
302
+ * Checks if `value` is classified as a `Symbol` primitive or object.
303
+ *
304
+ * @static
305
+ * @memberOf _
306
+ * @since 4.0.0
307
+ * @category Lang
308
+ * @param {*} value The value to check.
309
+ * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
310
+ * @example
311
+ *
312
+ * _.isSymbol(Symbol.iterator);
313
+ * // => true
314
+ *
315
+ * _.isSymbol('abc');
316
+ * // => false
317
+ */
318
+ function isSymbol(value) {
319
+ return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;
320
+ }
321
+
322
+ /**
323
+ * Converts `value` to a number.
324
+ *
325
+ * @static
326
+ * @memberOf _
327
+ * @since 4.0.0
328
+ * @category Lang
329
+ * @param {*} value The value to process.
330
+ * @returns {number} Returns the number.
331
+ * @example
332
+ *
333
+ * _.toNumber(3.2);
334
+ * // => 3.2
335
+ *
336
+ * _.toNumber(Number.MIN_VALUE);
337
+ * // => 5e-324
338
+ *
339
+ * _.toNumber(Infinity);
340
+ * // => Infinity
341
+ *
342
+ * _.toNumber('3.2');
343
+ * // => 3.2
344
+ */
345
+ function toNumber(value) {
346
+ if (typeof value == 'number') {
347
+ return value;
348
+ }
349
+ if (isSymbol(value)) {
350
+ return NAN;
351
+ }
352
+ if (isObject(value)) {
353
+ var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
354
+ value = isObject(other) ? other + '' : other;
355
+ }
356
+ if (typeof value != 'string') {
357
+ return value === 0 ? value : +value;
358
+ }
359
+ value = value.replace(reTrim, '');
360
+ var isBinary = reIsBinary.test(value);
361
+ return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
362
+ }
363
+ lodash_debounce = debounce;
364
+ return lodash_debounce;
365
+ }
366
+
367
+ export { requireLodash_debounce as __require };
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- import { __module as propTypes } from '../../_virtual/index2.js';
8
+ import { __module as propTypes } from '../../_virtual/index3.js';
9
9
  import require$$0 from 'react-is';
10
10
  import { __require as requireFactoryWithTypeCheckers } from './factoryWithTypeCheckers.js';
11
11
  import { __require as requireFactoryWithThrowingShims } from './factoryWithThrowingShims.js';
package/es/settings.js CHANGED
@@ -11,9 +11,6 @@ import '@carbon/themes';
11
11
  import pconsole from './global/js/utils/pconsole.js';
12
12
  import { Canary } from './components/_Canary/Canary.js';
13
13
 
14
- const carbon = {
15
- prefix: 'cds'
16
- };
17
14
  const componentDeprecatedWarning = (name, details) => `Carbon for IBM Products (WARNING): Component "${name}" is deprecated. ${details}`;
18
15
  pkg$1.logDeprecated = (component, name) => {
19
16
  if (component?.deprecated) {
@@ -85,4 +82,4 @@ pkg$1.checkComponentEnabled = (component, name) => {
85
82
  };
86
83
  const pkg = pkg$1;
87
84
 
88
- export { carbon, pkg };
85
+ export { pkg };
@@ -7,8 +7,11 @@
7
7
 
8
8
  'use strict';
9
9
 
10
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
11
+
10
12
  function getDefaultExportFromCjs (x) {
11
13
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
12
14
  }
13
15
 
16
+ exports.commonjsGlobal = commonjsGlobal;
14
17
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
@@ -7,6 +7,12 @@
7
7
 
8
8
  'use strict';
9
9
 
10
- var propTypes = {exports: {}};
10
+ Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
- exports.__module = propTypes;
12
+ var _commonjsHelpers = require('./_commonjsHelpers.js');
13
+ var index = require('../node_modules/lodash.debounce/index.js');
14
+
15
+ var lodash_debounceExports = index.__require();
16
+ var debounce = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(lodash_debounceExports);
17
+
18
+ exports.default = debounce;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright IBM Corp. 2020, 2025
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 propTypes = {exports: {}};
11
+
12
+ exports.__module = propTypes;
@@ -17,9 +17,10 @@ var AddSelectList = require('./AddSelectList.js');
17
17
  var AddSelectSort = require('./AddSelectSort.js');
18
18
  var addSelectUtils = require('./add-select-utils.js');
19
19
  var useItemSort = require('./hooks/useItemSort.js');
20
- var uuidv4 = require('../../global/js/utils/uuidv4.js');
20
+ var useId = require('../../global/js/utils/useId.js');
21
21
  var useParentSelect = require('./hooks/useParentSelect.js');
22
22
 
23
+ var _Filter;
23
24
  const blockClass = `${settings.pkg.prefix}--add-select`;
24
25
  const colClass = `${blockClass}__column`;
25
26
  const componentName = 'AddSelectColumn';
@@ -37,11 +38,13 @@ let AddSelectColumn = _ref => {
37
38
  sortByLabel,
38
39
  ...props
39
40
  } = _ref;
40
- const carbonPrefix = react.usePrefix();
41
41
  const {
42
42
  parentSelected,
43
43
  setParentSelected
44
44
  } = useParentSelect.default();
45
+ const selectAllId = useId.useId();
46
+ const filterId = useId.useId();
47
+ const searchId = useId.useId();
45
48
  const [searchTerm, setSearchTerm] = React.useState('');
46
49
  const {
47
50
  sortDirection,
@@ -49,6 +52,7 @@ let AddSelectColumn = _ref => {
49
52
  sortAttribute,
50
53
  setSortAttribute
51
54
  } = useItemSort.useItemSort();
55
+ const [filterOpen, setFilterOpen] = React.useState(false);
52
56
  const [filters, setFilters] = React.useState([]);
53
57
  const {
54
58
  entries,
@@ -114,6 +118,7 @@ let AddSelectColumn = _ref => {
114
118
  const filterByValue = item[filterBy];
115
119
  return filters.some(filter => filter === filterByValue);
116
120
  };
121
+ const filterBtnId = `filter-${filterId}`;
117
122
  const sortFn = addSelectUtils.sortItems(sortAttribute, sortDirection);
118
123
  const colItems = entries.filter(filterBySearch) // first check if the item meets the search
119
124
  .filter(filterByAttribute) // then check if the item is included in the filter
@@ -132,7 +137,7 @@ let AddSelectColumn = _ref => {
132
137
  onChange: e => setSearchTerm(e.target.value),
133
138
  placeholder: columnInputPlaceholder,
134
139
  className: `${colClass}-input`,
135
- id: uuidv4.default(),
140
+ id: searchId,
136
141
  labelText: columnInputPlaceholder,
137
142
  size: "md"
138
143
  }), /*#__PURE__*/React.createElement("div", {
@@ -145,20 +150,38 @@ let AddSelectColumn = _ref => {
145
150
  sortDirection: sortDirection,
146
151
  sortBy: sortBy,
147
152
  sortByLabel: sortByLabel
148
- }), filterByOpts.length > 0 && /*#__PURE__*/React.createElement(react.OverflowMenu, {
149
- renderIcon: props => /*#__PURE__*/React.createElement(icons.Filter, _rollupPluginBabelHelpers.extends({
150
- size: 32
151
- }, props)),
152
- className: `${colClass}-overflow`,
153
- flipped: true,
154
- "aria-label": filterByLabel,
155
- iconDescription: filterByLabel
156
- }, filterByOpts.map(opt => /*#__PURE__*/React.createElement("div", {
153
+ }), filterByOpts.length > 0 && /*#__PURE__*/React.createElement(react.unstable_FeatureFlags, {
154
+ enableV12DynamicFloatingStyles: true
155
+ }, /*#__PURE__*/React.createElement(react.Popover, {
156
+ align: "bottom-right",
157
+ isTabTip: true,
158
+ onKeyDown: e => {
159
+ if (e.key === 'Escape') {
160
+ setFilterOpen(false);
161
+ e.preventDefault(); // prevent modal close
162
+ e.stopPropagation();
163
+ const filterBtn = document.querySelector(`#${filterBtnId}`);
164
+ filterBtn?.focus(); // workaround to return focus, refs not possible on button inside popover for some reason
165
+ }
166
+ },
167
+ onRequestClose: () => setFilterOpen(false),
168
+ open: filterOpen
169
+ }, /*#__PURE__*/React.createElement(react.IconButton, {
170
+ size: "md",
171
+ id: filterBtnId,
172
+ hasIconOnly: true,
173
+ "aria-expanded": filterOpen,
174
+ badgeCount: filters.length > 0 ? 0 : undefined // setting to 0 renders an empty dot
175
+ ,
176
+ kind: "ghost",
177
+ label: filterByLabel || 'Filter',
178
+ onClick: () => {
179
+ setFilterOpen(prev => !prev);
180
+ }
181
+ }, _Filter || (_Filter = /*#__PURE__*/React.createElement(icons.Filter, null))), /*#__PURE__*/React.createElement(react.PopoverContent, {
182
+ className: `${colClass}-filter-popover`
183
+ }, filterByOpts.map(opt => /*#__PURE__*/React.createElement(react.Checkbox, {
157
184
  key: opt,
158
- className: `${carbonPrefix}--overflow-menu-options__option`
159
- }, /*#__PURE__*/React.createElement("div", {
160
- className: `${carbonPrefix}--overflow-menu-options__btn`
161
- }, /*#__PURE__*/React.createElement(react.Checkbox, {
162
185
  id: opt,
163
186
  labelText: opt,
164
187
  onChange: (event, _ref3) => {
@@ -171,7 +194,7 @@ let AddSelectColumn = _ref => {
171
194
  }))))))), /*#__PURE__*/React.createElement("div", {
172
195
  className: `${blockClass}__tags`
173
196
  }, /*#__PURE__*/React.createElement(react.Checkbox, {
174
- id: `${uuidv4.default()}-select-all`,
197
+ id: `${selectAllId}-select-all`,
175
198
  className: `${colClass}__select-all`,
176
199
  checked: allSelected,
177
200
  onChange: selectAllHandler,
@@ -14,7 +14,6 @@ var react = require('@carbon/react');
14
14
  var icons = require('@carbon/react/icons');
15
15
  var settings = require('../../settings.js');
16
16
 
17
- var _ArrowUp, _ArrowDown;
18
17
  const blockClass = `${settings.pkg.prefix}--add-select-sort`;
19
18
  const componentName = 'AddSelectSort';
20
19
  const AddSelectSort = _ref => {
@@ -27,16 +26,12 @@ const AddSelectSort = _ref => {
27
26
  const sortByOpts = sortBy ? sortBy?.reduce((acc, cur) => {
28
27
  const opts = [{
29
28
  id: `${cur}-asc`,
30
- itemText: /*#__PURE__*/React.createElement(React.Fragment, null, _ArrowUp || (_ArrowUp = /*#__PURE__*/React.createElement(icons.ArrowUp, {
31
- size: 16
32
- })), cur),
29
+ label: cur,
33
30
  direction: 'asc',
34
31
  attribute: cur
35
32
  }, {
36
33
  id: `${cur}-desc`,
37
- itemText: /*#__PURE__*/React.createElement(React.Fragment, null, _ArrowDown || (_ArrowDown = /*#__PURE__*/React.createElement(icons.ArrowDown, {
38
- size: 16
39
- })), cur),
34
+ label: cur,
40
35
  direction: 'desc',
41
36
  attribute: cur
42
37
  }];
@@ -54,22 +49,26 @@ const AddSelectSort = _ref => {
54
49
  };
55
50
  return /*#__PURE__*/React.createElement("div", {
56
51
  className: blockClass
57
- }, sortByOpts.length > 0 && /*#__PURE__*/React.createElement(react.OverflowMenu, {
52
+ }, sortByOpts.length > 0 && /*#__PURE__*/React.createElement(react.unstable_FeatureFlags, {
53
+ enableV12Overflowmenu: true
54
+ }, /*#__PURE__*/React.createElement(react.OverflowMenu
55
+ // @ts-ignore // TODO: remove after carbon fixes this ts error
56
+ , {
57
+ autoAlign: true,
58
+ menuAlignment: "bottom-end",
58
59
  renderIcon: props => /*#__PURE__*/React.createElement(icons.ArrowsVertical, _rollupPluginBabelHelpers.extends({
59
60
  size: 32
60
61
  }, props)),
61
62
  className: `${blockClass}_overflow`,
62
- flipped: true,
63
- "aria-label": sortByLabel,
64
- iconDescription: sortByLabel
63
+ label: sortByLabel
65
64
  }, sortByOpts.map(opt => {
66
- return /*#__PURE__*/React.createElement(react.OverflowMenuItem, {
65
+ return /*#__PURE__*/React.createElement(react.MenuItem, {
67
66
  className: `${blockClass}_overflow-item`,
68
67
  key: opt?.id,
69
- itemText: opt?.itemText,
68
+ label: `${opt?.label} ${opt?.direction}`,
70
69
  onClick: () => sortHandler(opt)
71
70
  });
72
- })));
71
+ }))));
73
72
  };
74
73
  AddSelectSort.propTypes = {
75
74
  setSortAttribute: index.default.func,
@@ -47,5 +47,5 @@ export interface SortOption {
47
47
  id?: string;
48
48
  direction?: string;
49
49
  attribute?: string;
50
- itemText?: ReactNode;
50
+ label?: string;
51
51
  }
@@ -10,7 +10,7 @@ type LinkType = {
10
10
  [key: string]: unknown;
11
11
  };
12
12
  export interface ActionIcon extends Metadata {
13
- onKeydown?: (event: KeyboardEvent) => void;
13
+ onKeyDown?: (event: KeyboardEvent) => void;
14
14
  onClick?: (event: React.MouseEvent<HTMLButtonElement | HTMLAnchorElement>) => void;
15
15
  /**
16
16
  * @deprecated please use the `link.href` instead
@@ -22,7 +22,7 @@ type OverflowActions = {
22
22
  id?: string;
23
23
  itemText?: string;
24
24
  onClick?: () => void;
25
- onKeydown?: () => void;
25
+ onKeyDown?: () => void;
26
26
  };
27
27
  interface CardProp extends PropsWithChildren {
28
28
  actionIcons?: readonly ActionIcon[];
@@ -98,12 +98,15 @@ const Card = /*#__PURE__*/React.forwardRef((_ref, ref) => {
98
98
  let {
99
99
  id,
100
100
  itemText,
101
- ...rest
101
+ onKeyDown,
102
+ onClick
102
103
  } = _ref2;
103
- return /*#__PURE__*/React.createElement(react.MenuItem, _rollupPluginBabelHelpers.extends({
104
+ return /*#__PURE__*/React.createElement(react.MenuItem, {
104
105
  key: id,
105
- label: itemText ?? ''
106
- }, rest));
106
+ label: itemText ?? '',
107
+ onKeyDown: onKeyDown,
108
+ onClick: onClick
109
+ });
107
110
  }))));
108
111
  }
109
112
  const icons = getIcons().map(_ref3 => {