@carbon/ibm-products 2.68.0-rc.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.
- package/css/carbon.css +382 -74
- package/css/carbon.css.map +1 -1
- package/css/index-full-carbon.css +524 -116
- package/css/index-full-carbon.css.map +1 -1
- package/css/index-full-carbon.min.css +1 -1
- package/css/index-full-carbon.min.css.map +1 -1
- package/css/index-without-carbon-released-only.css +126 -42
- package/css/index-without-carbon-released-only.css.map +1 -1
- package/css/index-without-carbon-released-only.min.css +1 -1
- package/css/index-without-carbon-released-only.min.css.map +1 -1
- package/css/index-without-carbon.css +142 -42
- package/css/index-without-carbon.css.map +1 -1
- package/css/index-without-carbon.min.css +1 -1
- package/css/index-without-carbon.min.css.map +1 -1
- package/css/index.css +185 -50
- package/css/index.css.map +1 -1
- package/css/index.min.css +1 -1
- package/css/index.min.css.map +1 -1
- package/es/_virtual/_commonjsHelpers.js +3 -1
- package/es/_virtual/index2.js +6 -2
- package/es/_virtual/index3.js +10 -0
- package/es/components/AddSelect/AddSelectColumn.js +41 -18
- package/es/components/AddSelect/AddSelectSort.js +15 -16
- package/es/components/AddSelect/types/index.d.ts +1 -1
- package/es/components/Card/Card.d.ts +2 -2
- package/es/components/Card/Card.js +7 -4
- package/es/components/Coachmark/Coachmark.d.ts +43 -0
- package/es/components/Coachmark/Coachmark.js +49 -33
- package/es/components/Coachmark/CoachmarkOverlay.js +6 -0
- package/es/components/Coachmark/index.d.ts +1 -0
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +11 -0
- package/es/components/CoachmarkBeacon/CoachmarkBeacon.js +19 -11
- package/es/components/CoachmarkButton/CoachmarkButton.js +7 -0
- package/es/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +6 -0
- package/es/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +7 -0
- package/es/components/Datagrid/Datagrid/DatagridContent.js +7 -5
- package/es/components/Datagrid/Datagrid/DatagridRow.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/DatagridRow.js +4 -3
- package/es/components/Datagrid/Datagrid/DatagridToolbar.d.ts +1 -1
- package/es/components/Datagrid/Datagrid/DatagridToolbar.js +8 -7
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
- package/es/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +4 -3
- package/es/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +4 -3
- package/es/components/Datagrid/useNestedRowExpander.js +4 -2
- package/es/components/Datagrid/useOnRowClick.d.ts +1 -1
- package/es/components/Datagrid/useOnRowClick.js +6 -4
- package/es/components/Datagrid/useRowExpander.js +4 -2
- package/es/components/Datagrid/useSelectRows.d.ts +1 -1
- package/es/components/Datagrid/useSelectRows.js +4 -3
- package/es/components/Datagrid/useSortableColumns.d.ts +1 -1
- package/es/components/Datagrid/useSortableColumns.js +6 -5
- package/es/components/EditInPlace/EditInPlace.d.ts +1 -1
- package/es/components/EditInPlace/EditInPlace.js +4 -3
- package/es/components/EmptyStates/EmptyStateContent.d.ts +30 -1
- package/es/components/EmptyStates/EmptyStateContent.js +2 -2
- package/es/components/ExportModal/ExportModal.js +7 -5
- package/es/components/FeatureFlags/index.d.ts +31 -12
- package/es/components/FeatureFlags/index.js +46 -15
- package/es/components/InterstitialScreen/InterstitialScreenBody.js +3 -2
- package/es/components/InterstitialScreen/InterstitialScreenFooter.js +5 -2
- package/es/components/InterstitialScreen/InterstitialScreenHeader.js +3 -1
- package/es/components/ProductiveCard/ProductiveCard.d.ts +1 -1
- package/es/components/ScrollGradient/ScrollGradient.js +9 -7
- package/es/components/SidePanel/SidePanel.js +74 -0
- package/es/components/SidePanel/constants.d.ts +14 -8
- package/es/components/SidePanel/constants.js +1 -1
- package/es/components/SidePanel/resizer/Resizer.d.ts +21 -0
- package/es/components/SidePanel/resizer/Resizer.js +271 -0
- package/es/components/TruncatedList/TruncatedList.d.ts +1 -1
- package/es/components/TruncatedList/TruncatedList.js +4 -3
- package/es/feature-flags.js +5 -1
- package/es/index.js +1 -0
- package/es/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/es/index.js +3 -3
- package/es/node_modules/@carbon/icons-react/es/Icon.js +1 -1
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-10.js +816 -808
- package/es/node_modules/@carbon/icons-react/es/generated/bucket-3.js +615 -637
- package/es/node_modules/lodash.debounce/index.js +367 -0
- package/es/node_modules/prop-types/index.js +1 -1
- package/es/settings.js +1 -4
- package/lib/_virtual/_commonjsHelpers.js +3 -0
- package/lib/_virtual/index2.js +8 -2
- package/lib/_virtual/index3.js +12 -0
- package/lib/components/AddSelect/AddSelectColumn.js +40 -17
- package/lib/components/AddSelect/AddSelectSort.js +13 -14
- package/lib/components/AddSelect/types/index.d.ts +1 -1
- package/lib/components/Card/Card.d.ts +2 -2
- package/lib/components/Card/Card.js +7 -4
- package/lib/components/Coachmark/Coachmark.d.ts +43 -0
- package/lib/components/Coachmark/Coachmark.js +50 -32
- package/lib/components/Coachmark/CoachmarkOverlay.js +6 -0
- package/lib/components/Coachmark/index.d.ts +1 -0
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.d.ts +11 -0
- package/lib/components/CoachmarkBeacon/CoachmarkBeacon.js +19 -11
- package/lib/components/CoachmarkButton/CoachmarkButton.js +7 -0
- package/lib/components/CoachmarkOverlayElement/CoachmarkOverlayElement.js +6 -0
- package/lib/components/CoachmarkOverlayElements/CoachmarkOverlayElements.js +7 -0
- package/lib/components/Datagrid/Datagrid/DatagridContent.js +5 -3
- package/lib/components/Datagrid/Datagrid/DatagridRow.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridRow.js +2 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.d.ts +1 -1
- package/lib/components/Datagrid/Datagrid/DatagridToolbar.js +6 -5
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.d.ts +2 -1
- package/lib/components/Datagrid/Datagrid/addons/InlineEdit/handleGridKeyPress.js +3 -2
- package/lib/components/Datagrid/Datagrid/addons/RowSize/RowSizeDropdown.js +2 -1
- package/lib/components/Datagrid/useNestedRowExpander.js +3 -1
- package/lib/components/Datagrid/useOnRowClick.d.ts +1 -1
- package/lib/components/Datagrid/useOnRowClick.js +5 -3
- package/lib/components/Datagrid/useRowExpander.js +3 -1
- package/lib/components/Datagrid/useSelectRows.d.ts +1 -1
- package/lib/components/Datagrid/useSelectRows.js +2 -1
- package/lib/components/Datagrid/useSortableColumns.d.ts +1 -1
- package/lib/components/Datagrid/useSortableColumns.js +4 -3
- package/lib/components/EditInPlace/EditInPlace.d.ts +1 -1
- package/lib/components/EditInPlace/EditInPlace.js +2 -1
- package/lib/components/EmptyStates/EmptyStateContent.d.ts +30 -1
- package/lib/components/EmptyStates/EmptyStateContent.js +2 -2
- package/lib/components/ExportModal/ExportModal.js +5 -3
- package/lib/components/FeatureFlags/index.d.ts +31 -12
- package/lib/components/FeatureFlags/index.js +46 -15
- package/lib/components/InterstitialScreen/InterstitialScreenBody.js +3 -2
- package/lib/components/InterstitialScreen/InterstitialScreenFooter.js +5 -2
- package/lib/components/InterstitialScreen/InterstitialScreenHeader.js +3 -1
- package/lib/components/ProductiveCard/ProductiveCard.d.ts +1 -1
- package/lib/components/ScrollGradient/ScrollGradient.js +8 -6
- package/lib/components/SidePanel/SidePanel.js +74 -0
- package/lib/components/SidePanel/constants.d.ts +14 -8
- package/lib/components/SidePanel/constants.js +1 -1
- package/lib/components/SidePanel/resizer/Resizer.d.ts +21 -0
- package/lib/components/SidePanel/resizer/Resizer.js +277 -0
- package/lib/components/TruncatedList/TruncatedList.d.ts +1 -1
- package/lib/components/TruncatedList/TruncatedList.js +2 -1
- package/lib/feature-flags.js +5 -1
- package/lib/index.js +1 -0
- package/lib/node_modules/@carbon/{icons-react/node_modules/@carbon/icon-helpers → icon-helpers}/es/index.js +3 -3
- package/lib/node_modules/@carbon/icons-react/es/Icon.js +1 -1
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-10.js +839 -831
- package/lib/node_modules/@carbon/icons-react/es/generated/bucket-3.js +621 -643
- package/lib/node_modules/lodash.debounce/index.js +369 -0
- package/lib/node_modules/prop-types/index.js +1 -1
- package/lib/settings.js +0 -4
- package/package.json +15 -15
- package/scss/components/AddSelect/_add-select.scss +12 -13
- package/scss/components/SidePanel/_side-panel-variables.scss +1 -5
- package/scss/components/SidePanel/_side-panel.scss +129 -12
- package/scss/global/decorators/_side-panel-decorator.scss +36 -8
- package/telemetry.yml +17 -0
@@ -0,0 +1,271 @@
|
|
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 { extends as _extends } from '../../../_virtual/_rollupPluginBabelHelpers.js';
|
9
|
+
import React__default, { forwardRef, useRef, useState, useEffect, useCallback } from 'react';
|
10
|
+
import cx from 'classnames';
|
11
|
+
import debounce from '../../../_virtual/index2.js';
|
12
|
+
|
13
|
+
var _span;
|
14
|
+
const DEBOUNCE_DELAY = 100;
|
15
|
+
/** Primary UI component for user interaction */
|
16
|
+
|
17
|
+
const getRefElement = ref => {
|
18
|
+
if (!ref || !('current' in ref)) {
|
19
|
+
return null;
|
20
|
+
}
|
21
|
+
return ref.current;
|
22
|
+
};
|
23
|
+
const Resizer = /*#__PURE__*/forwardRef((_ref, forwardedRef) => {
|
24
|
+
let {
|
25
|
+
orientation,
|
26
|
+
onResize,
|
27
|
+
onResizeEnd,
|
28
|
+
onDoubleClick,
|
29
|
+
className,
|
30
|
+
...rest
|
31
|
+
} = _ref;
|
32
|
+
const prefix = 'clabs';
|
33
|
+
const blockClass = `${prefix}__resizer`;
|
34
|
+
const internalRef = useRef(null);
|
35
|
+
const ref = forwardedRef || internalRef; // combine refs, forwarded ref takes priority over internal ref
|
36
|
+
const [isResizing, setIsResizing] = useState(false);
|
37
|
+
const startPos = useRef({
|
38
|
+
x: 0,
|
39
|
+
y: 0
|
40
|
+
});
|
41
|
+
// Sizes of the previous and next siblings, gets modified during resizing
|
42
|
+
const sizes = useRef({
|
43
|
+
prevSiblingSize: {
|
44
|
+
width: 0,
|
45
|
+
height: 0
|
46
|
+
},
|
47
|
+
nextSiblingSize: {
|
48
|
+
width: 0,
|
49
|
+
height: 0
|
50
|
+
}
|
51
|
+
});
|
52
|
+
// Initial sizes of the previous and next siblings, a static reference
|
53
|
+
const initialSizes = useRef({
|
54
|
+
prevSiblingSize: {
|
55
|
+
width: 0,
|
56
|
+
height: 0
|
57
|
+
},
|
58
|
+
nextSiblingSize: {
|
59
|
+
width: 0,
|
60
|
+
height: 0
|
61
|
+
}
|
62
|
+
});
|
63
|
+
|
64
|
+
// Debounced function to handle resize end events
|
65
|
+
// This is used to prevent multiple calls during a resize operation especially from keyboard when the key is held down
|
66
|
+
// It will only call the onResizeEnd after the user has stopped resizing
|
67
|
+
const debouncedResizeEnd = useRef(debounce(event => {
|
68
|
+
const element = getRefElement(ref);
|
69
|
+
if (element && onResizeEnd) {
|
70
|
+
onResizeEnd(event, ref);
|
71
|
+
}
|
72
|
+
}, DEBOUNCE_DELAY));
|
73
|
+
useEffect(() => {
|
74
|
+
const element = getRefElement(ref);
|
75
|
+
if (!element) {
|
76
|
+
return;
|
77
|
+
}
|
78
|
+
const prevSibling = element.previousElementSibling;
|
79
|
+
const nextSibling = element.nextElementSibling;
|
80
|
+
const rect = el => el?.getBoundingClientRect();
|
81
|
+
initialSizes.current = {
|
82
|
+
prevSiblingSize: prevSibling ? {
|
83
|
+
width: rect(prevSibling).width,
|
84
|
+
height: rect(prevSibling).height
|
85
|
+
} : {
|
86
|
+
width: 0,
|
87
|
+
height: 0
|
88
|
+
},
|
89
|
+
nextSiblingSize: nextSibling ? {
|
90
|
+
width: rect(nextSibling).width,
|
91
|
+
height: rect(nextSibling).height
|
92
|
+
} : {
|
93
|
+
width: 0,
|
94
|
+
height: 0
|
95
|
+
}
|
96
|
+
};
|
97
|
+
}, [ref]);
|
98
|
+
const updateSizes = useCallback((event, delta) => {
|
99
|
+
const element = getRefElement(ref);
|
100
|
+
if (!element) {
|
101
|
+
return;
|
102
|
+
}
|
103
|
+
if (onResize) {
|
104
|
+
onResize(event, delta);
|
105
|
+
return;
|
106
|
+
}
|
107
|
+
const prevSibling = element.previousElementSibling;
|
108
|
+
const nextSibling = element.nextElementSibling;
|
109
|
+
const prop = orientation === 'horizontal' ? 'height' : 'width';
|
110
|
+
if (prevSibling) {
|
111
|
+
const newSize = sizes.current.prevSiblingSize[prop] + delta;
|
112
|
+
prevSibling.style[prop] = `${newSize}px`;
|
113
|
+
}
|
114
|
+
if (nextSibling) {
|
115
|
+
const newSize = sizes.current.nextSiblingSize[prop] - delta;
|
116
|
+
nextSibling.style[prop] = `${newSize}px`;
|
117
|
+
}
|
118
|
+
}, [onResize, orientation, ref]);
|
119
|
+
const handleMouseMove = useCallback(event => {
|
120
|
+
event.preventDefault();
|
121
|
+
event.stopPropagation();
|
122
|
+
const delta = orientation === 'horizontal' ? event.clientY - startPos.current.y : event.clientX - startPos.current.x;
|
123
|
+
updateSizes(event, delta);
|
124
|
+
}, [orientation, updateSizes]);
|
125
|
+
const handleMouseUp = useCallback(event => {
|
126
|
+
const element = getRefElement(ref);
|
127
|
+
if (!element) {
|
128
|
+
return;
|
129
|
+
}
|
130
|
+
setIsResizing(false);
|
131
|
+
if (onResizeEnd) {
|
132
|
+
onResizeEnd(event, ref);
|
133
|
+
}
|
134
|
+
const prevSibling = element.previousElementSibling;
|
135
|
+
const nextSibling = element.nextElementSibling;
|
136
|
+
if (prevSibling) {
|
137
|
+
prevSibling.style.transition = '';
|
138
|
+
}
|
139
|
+
if (nextSibling) {
|
140
|
+
nextSibling.style.transition = '';
|
141
|
+
}
|
142
|
+
}, [onResizeEnd, ref]);
|
143
|
+
|
144
|
+
// Effect to add/remove mousemove and mouseup listeners during resizing
|
145
|
+
useEffect(() => {
|
146
|
+
if (!isResizing) {
|
147
|
+
return;
|
148
|
+
}
|
149
|
+
window.addEventListener('mousemove', handleMouseMove);
|
150
|
+
window.addEventListener('mouseup', handleMouseUp);
|
151
|
+
return () => {
|
152
|
+
window.removeEventListener('mousemove', handleMouseMove);
|
153
|
+
window.removeEventListener('mouseup', handleMouseUp);
|
154
|
+
};
|
155
|
+
}, [isResizing, handleMouseMove, handleMouseUp]);
|
156
|
+
const handleMouseDown = useCallback(event => {
|
157
|
+
event.preventDefault();
|
158
|
+
event.stopPropagation();
|
159
|
+
const element = getRefElement(ref);
|
160
|
+
if (!element) {
|
161
|
+
return;
|
162
|
+
}
|
163
|
+
const prevSibling = element.previousElementSibling;
|
164
|
+
const nextSibling = element.nextElementSibling;
|
165
|
+
const rect = el => el?.getBoundingClientRect();
|
166
|
+
prevSibling && (prevSibling.style.transition = 'none');
|
167
|
+
nextSibling && (nextSibling.style.transition = 'none');
|
168
|
+
setIsResizing(true);
|
169
|
+
startPos.current = {
|
170
|
+
x: event.clientX,
|
171
|
+
y: event.clientY
|
172
|
+
};
|
173
|
+
sizes.current = {
|
174
|
+
prevSiblingSize: prevSibling ? {
|
175
|
+
width: rect(prevSibling).width,
|
176
|
+
height: rect(prevSibling).height
|
177
|
+
} : {
|
178
|
+
width: 0,
|
179
|
+
height: 0
|
180
|
+
},
|
181
|
+
nextSiblingSize: nextSibling ? {
|
182
|
+
width: rect(nextSibling).width,
|
183
|
+
height: rect(nextSibling).height
|
184
|
+
} : {
|
185
|
+
width: 0,
|
186
|
+
height: 0
|
187
|
+
}
|
188
|
+
};
|
189
|
+
}, [ref]);
|
190
|
+
const handleKeyDown = useCallback(event => {
|
191
|
+
const navigationKeys = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End'];
|
192
|
+
if (![...navigationKeys, 'PageUp', 'PageDown'].includes(event.key)) {
|
193
|
+
return;
|
194
|
+
}
|
195
|
+
const element = getRefElement(ref);
|
196
|
+
if (!element) {
|
197
|
+
return;
|
198
|
+
}
|
199
|
+
event.preventDefault();
|
200
|
+
event.stopPropagation();
|
201
|
+
const prevSibling = element.previousElementSibling;
|
202
|
+
const nextSibling = element.nextElementSibling;
|
203
|
+
const getSize = el => {
|
204
|
+
const rect = el?.getBoundingClientRect();
|
205
|
+
return {
|
206
|
+
width: rect?.width || 0,
|
207
|
+
height: rect?.height || 0
|
208
|
+
};
|
209
|
+
};
|
210
|
+
sizes.current = {
|
211
|
+
prevSiblingSize: getSize(prevSibling),
|
212
|
+
nextSiblingSize: getSize(nextSibling)
|
213
|
+
};
|
214
|
+
const step = event.shiftKey ? 25 : 5;
|
215
|
+
let delta = 0;
|
216
|
+
const isHorizontal = orientation === 'horizontal';
|
217
|
+
const keyMap = {
|
218
|
+
ArrowUp: () => isHorizontal ? delta = -step : null,
|
219
|
+
ArrowDown: () => isHorizontal ? delta = step : null,
|
220
|
+
ArrowLeft: () => !isHorizontal ? delta = -step : null,
|
221
|
+
ArrowRight: () => !isHorizontal ? delta = step : null,
|
222
|
+
Home: () => delta = isHorizontal ? -sizes.current.prevSiblingSize.height : -sizes.current.prevSiblingSize.width,
|
223
|
+
End: () => delta = isHorizontal ? sizes.current.nextSiblingSize.height : sizes.current.nextSiblingSize.width
|
224
|
+
};
|
225
|
+
keyMap[event.key]?.();
|
226
|
+
updateSizes(event, delta);
|
227
|
+
debouncedResizeEnd?.current(event);
|
228
|
+
}, [orientation, updateSizes, debouncedResizeEnd, ref]);
|
229
|
+
const handleDoubleClick = event => {
|
230
|
+
event.preventDefault();
|
231
|
+
const element = getRefElement(ref);
|
232
|
+
if (!element) {
|
233
|
+
return;
|
234
|
+
}
|
235
|
+
const prevSibling = element.previousElementSibling;
|
236
|
+
const nextSibling = element.nextElementSibling;
|
237
|
+
if (onDoubleClick) {
|
238
|
+
onDoubleClick(event);
|
239
|
+
} else {
|
240
|
+
const prop = orientation === 'horizontal' ? 'height' : 'width';
|
241
|
+
if (prevSibling) {
|
242
|
+
prevSibling.style[prop] = `${initialSizes.current.prevSiblingSize[prop]}px`;
|
243
|
+
}
|
244
|
+
if (nextSibling) {
|
245
|
+
nextSibling.style[prop] = `${initialSizes.current.nextSiblingSize[prop]}px`;
|
246
|
+
}
|
247
|
+
}
|
248
|
+
};
|
249
|
+
return (
|
250
|
+
/*#__PURE__*/
|
251
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions
|
252
|
+
React__default.createElement("div", _extends({}, rest, {
|
253
|
+
ref: ref,
|
254
|
+
role: "separator"
|
255
|
+
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
256
|
+
,
|
257
|
+
tabIndex: 0,
|
258
|
+
"aria-orientation": orientation,
|
259
|
+
"aria-live": "assertive",
|
260
|
+
onMouseDown: handleMouseDown,
|
261
|
+
onDoubleClick: handleDoubleClick,
|
262
|
+
onKeyDown: handleKeyDown,
|
263
|
+
className: cx([className, blockClass, `${blockClass}--${orientation}`])
|
264
|
+
}), _span || (_span = /*#__PURE__*/React__default.createElement("span", {
|
265
|
+
className: "sr-only"
|
266
|
+
}, "Use arrow keys to resize, hold Shift for larger steps. Double-click to reset.")))
|
267
|
+
);
|
268
|
+
});
|
269
|
+
Resizer.displayName = 'Resizer';
|
270
|
+
|
271
|
+
export { DEBOUNCE_DELAY, Resizer, Resizer as default };
|
@@ -7,8 +7,8 @@
|
|
7
7
|
|
8
8
|
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
9
9
|
import React__default, { Children, useState, useRef, useEffect } from 'react';
|
10
|
-
import { pkg
|
11
|
-
import { Button } from '@carbon/react';
|
10
|
+
import { pkg } from '../../settings.js';
|
11
|
+
import { usePrefix, Button } from '@carbon/react';
|
12
12
|
import PropTypes from '../../_virtual/index.js';
|
13
13
|
import cx from 'classnames';
|
14
14
|
import { getDevtoolsProps } from '../../global/js/utils/devtools.js';
|
@@ -56,6 +56,7 @@ let TruncatedList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
56
56
|
// (difference of the guessed height to rendered height - a few pixels)
|
57
57
|
const [listHeight, setListHeight] = useState(minItems * 16);
|
58
58
|
const listRef = useRef(undefined);
|
59
|
+
const carbonPrefix = usePrefix();
|
59
60
|
const handleToggle = () => {
|
60
61
|
setIsCollapsed(prev => !prev);
|
61
62
|
};
|
@@ -97,7 +98,7 @@ let TruncatedList = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
97
98
|
className: `${blockClass}__list`,
|
98
99
|
ref: listRef
|
99
100
|
}, isCollapsed ? childrenArray.slice(0, minItems) : children), childrenArray.length > minItems && /*#__PURE__*/React__default.createElement(Button, {
|
100
|
-
className: cx(`${blockClass}__button`, `${
|
101
|
+
className: cx(`${blockClass}__button`, `${carbonPrefix}--link`, buttonClassName),
|
101
102
|
kind: "ghost",
|
102
103
|
size: "sm",
|
103
104
|
onClick: handleToggle
|
package/es/feature-flags.js
CHANGED
@@ -14,5 +14,9 @@ FeatureFlags.merge({
|
|
14
14
|
'enable-datagrid-useCustomizeColumns': false,
|
15
15
|
'ExampleComponent.secondaryIcon': false,
|
16
16
|
'ExampleComponent.useExample': false,
|
17
|
-
'enable-
|
17
|
+
'enable-test-flag-a': false,
|
18
|
+
// used in testing
|
19
|
+
'enable-test-flag-b': true,
|
20
|
+
// used in testing
|
21
|
+
enableSidepanelResizer: false
|
18
22
|
});
|
package/es/index.js
CHANGED
@@ -80,6 +80,7 @@ export { EditFullPage } from './components/EditFullPage/EditFullPage.js';
|
|
80
80
|
export { EditUpdateCards } from './components/EditUpdateCards/EditUpdateCards.js';
|
81
81
|
export { Checklist } from './components/Checklist/Checklist.js';
|
82
82
|
export { Coachmark } from './components/Coachmark/Coachmark.js';
|
83
|
+
import './components/Coachmark/CoachmarkTagline.js';
|
83
84
|
export { CoachmarkBeacon } from './components/CoachmarkBeacon/CoachmarkBeacon.js';
|
84
85
|
export { CoachmarkButton } from './components/CoachmarkButton/CoachmarkButton.js';
|
85
86
|
export { CoachmarkFixed } from './components/CoachmarkFixed/CoachmarkFixed.js';
|
@@ -40,8 +40,8 @@ function _objectWithoutProperties(e, t) {
|
|
40
40
|
r,
|
41
41
|
i = _objectWithoutPropertiesLoose(e, t);
|
42
42
|
if (Object.getOwnPropertySymbols) {
|
43
|
-
var
|
44
|
-
for (r = 0; r <
|
43
|
+
var n = Object.getOwnPropertySymbols(e);
|
44
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
45
45
|
}
|
46
46
|
return i;
|
47
47
|
}
|
@@ -49,7 +49,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
49
49
|
if (null == r) return {};
|
50
50
|
var t = {};
|
51
51
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
52
|
-
if (e.
|
52
|
+
if (-1 !== e.indexOf(n)) continue;
|
53
53
|
t[n] = r[n];
|
54
54
|
}
|
55
55
|
return t;
|
@@ -5,7 +5,7 @@
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
6
6
|
*/
|
7
7
|
|
8
|
-
import { getAttributes } from '
|
8
|
+
import { getAttributes } from '../../icon-helpers/es/index.js';
|
9
9
|
import PropTypes from '../../../../_virtual/index.js';
|
10
10
|
import React__default from 'react';
|
11
11
|
|