@box/blueprint-web 12.135.0 → 12.136.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/dist/lib-esm/accordion/accordion.module.js +1 -1
- package/dist/lib-esm/breadcrumb/breadcrumb-dropdown.d.ts +1 -1
- package/dist/lib-esm/breadcrumb/breadcrumb-dropdown.js +6 -4
- package/dist/lib-esm/breadcrumb/breadcrumb.js +58 -98
- package/dist/lib-esm/breadcrumb/breadcrumb.module.js +1 -1
- package/dist/lib-esm/breadcrumb/ellipsis-truncation-view.d.ts +2 -0
- package/dist/lib-esm/breadcrumb/ellipsis-truncation-view.js +42 -0
- package/dist/lib-esm/breadcrumb/folder-tree-truncation-view.d.ts +2 -0
- package/dist/lib-esm/breadcrumb/folder-tree-truncation-view.js +41 -0
- package/dist/lib-esm/breadcrumb/full-view.d.ts +2 -0
- package/dist/lib-esm/breadcrumb/full-view.js +19 -0
- package/dist/lib-esm/breadcrumb/mobile-view.d.ts +2 -0
- package/dist/lib-esm/breadcrumb/mobile-view.js +37 -0
- package/dist/lib-esm/breadcrumb/page-link.d.ts +2 -17
- package/dist/lib-esm/breadcrumb/page-link.js +13 -4
- package/dist/lib-esm/breadcrumb/types.d.ts +52 -1
- package/dist/lib-esm/breadcrumb/useFolderTreeTruncation.d.ts +8 -21
- package/dist/lib-esm/breadcrumb/useFolderTreeTruncation.js +105 -143
- package/dist/lib-esm/card/card.module.js +1 -1
- package/dist/lib-esm/card-tooltip/card-tooltip.module.js +1 -1
- package/dist/lib-esm/card-tooltip-v2/card-tooltip-v2.module.js +1 -1
- package/dist/lib-esm/checkbox/checkbox.module.js +1 -1
- package/dist/lib-esm/collapsible/collapsible-section.module.js +1 -1
- package/dist/lib-esm/combobox/combobox.module.js +1 -1
- package/dist/lib-esm/combobox/types.d.ts +4 -0
- package/dist/lib-esm/combobox-group/combobox-group.module.js +1 -1
- package/dist/lib-esm/content-card/content-card-body.js +3 -2
- package/dist/lib-esm/content-card/content-card.module.js +1 -1
- package/dist/lib-esm/data-table/data-table.module.js +1 -1
- package/dist/lib-esm/date-picker/date-picker.module.js +1 -1
- package/dist/lib-esm/guided-tooltip/guided-tooltip.module.js +1 -1
- package/dist/lib-esm/index.css +1110 -1147
- package/dist/lib-esm/inline-table/inline-table.module.js +1 -1
- package/dist/lib-esm/input-chip/input-chip.module.js +1 -1
- package/dist/lib-esm/modal/modal.module.js +1 -1
- package/dist/lib-esm/primitives/base-text-input/base-text-input.module.js +1 -1
- package/dist/lib-esm/primitives/calendar/calendar.module.js +1 -1
- package/dist/lib-esm/primitives/chips/chip.module.js +1 -1
- package/dist/lib-esm/primitives/link/link.module.js +1 -1
- package/dist/lib-esm/primitives/notification/notification.module.js +1 -1
- package/dist/lib-esm/primitives/page-header/page-header.module.js +1 -1
- package/dist/lib-esm/primitives/select-menu-grid/select-menu-grid-option.module.js +1 -1
- package/dist/lib-esm/primitives/tabs/tabs.module.js +1 -1
- package/dist/lib-esm/radio-group/radio-group.module.js +1 -1
- package/dist/lib-esm/search-input/search.module.js +1 -1
- package/dist/lib-esm/select/select.module.js +1 -1
- package/dist/lib-esm/side-panel/side-panel.module.js +1 -1
- package/dist/lib-esm/status/status.module.js +1 -1
- package/dist/lib-esm/text-area/text-area-autosize/text-area-autosize.module.js +1 -1
- package/dist/lib-esm/text-area/text-area.module.js +1 -1
- package/dist/lib-esm/time-picker/time-picker.module.js +1 -1
- package/dist/lib-esm/toolbar/toolbar.module.js +1 -1
- package/dist/lib-esm/tooltip/tooltip.module.js +1 -1
- package/dist/lib-esm/util-components/base-grid-list-item/base-grid-list-item.module.js +1 -1
- package/dist/lib-esm/util-components/legend/legend.module.js +1 -1
- package/dist/lib-esm/util-components/menu-item-sections/menu-item-sections.module.js +1 -1
- package/dist/lib-esm/util-components/text-with-info-badge/text-with-info-badge.module.js +1 -1
- package/package.json +3 -3
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import noop from 'lodash/noop';
|
|
2
|
-
import { useState, useRef, useCallback,
|
|
2
|
+
import { useState, useRef, useCallback, useLayoutEffect } from 'react';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
const MAX_VISIBLE_CRUMBS = 3;
|
|
5
|
+
/**
|
|
6
|
+
* Calculates how many crumbs (from the end) can fit within the available width.
|
|
7
|
+
* Returns at least 1 to ensure we always show the current page.
|
|
8
|
+
*/
|
|
8
9
|
const calculateVisibleCrumbCount = (crumbWidths, availableWidth, gap, maxVisible) => {
|
|
9
10
|
let crumbWidthWithoutGaps = 0;
|
|
10
11
|
let visibleCount = 0;
|
|
@@ -20,15 +21,21 @@ const calculateVisibleCrumbCount = (crumbWidths, availableWidth, gap, maxVisible
|
|
|
20
21
|
}
|
|
21
22
|
return Math.max(1, visibleCount);
|
|
22
23
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
/**
|
|
25
|
+
* Measures the width of each crumb element.
|
|
26
|
+
*
|
|
27
|
+
* For the last crumb (no separator), we measure just the text element.
|
|
28
|
+
* For other crumbs, we measure the full <li> to include the separator.
|
|
29
|
+
*/
|
|
30
|
+
const measureCrumbWidths = (crumbElements, isLastCrumbIncluded) => {
|
|
31
|
+
return crumbElements.map((element, index) => {
|
|
32
|
+
const isLastCrumb = isLastCrumbIncluded && index === crumbElements.length - 1;
|
|
33
|
+
if (isLastCrumb) {
|
|
34
|
+
const textElement = element.firstElementChild;
|
|
35
|
+
return textElement?.offsetWidth ?? element.offsetWidth;
|
|
36
|
+
}
|
|
37
|
+
return element.offsetWidth;
|
|
30
38
|
});
|
|
31
|
-
return widths;
|
|
32
39
|
};
|
|
33
40
|
/**
|
|
34
41
|
* Calculate total width of crumbs including gaps
|
|
@@ -39,97 +46,50 @@ const calculateTotalWidth = (widths, gap) => {
|
|
|
39
46
|
return totalCrumbsWidth + totalGapWidth;
|
|
40
47
|
};
|
|
41
48
|
/**
|
|
42
|
-
*
|
|
49
|
+
* Determines the best truncation state using a cascading fallback strategy.
|
|
50
|
+
*
|
|
51
|
+
* Priority order (from most preferred to last resort):
|
|
52
|
+
* 1. Show all crumbs without truncation or ellipsis
|
|
53
|
+
* 2. Show icon + fewer crumbs without ellipsis
|
|
54
|
+
* 3. Show icon + 1 crumb with ellipsis (last resort)
|
|
43
55
|
*/
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
iconButtonWidth,
|
|
49
|
-
crumbCount,
|
|
50
|
-
storedCrumbWidths
|
|
51
|
-
} = context;
|
|
52
|
-
// If we don't have stored crumb widths yet, measure them
|
|
53
|
-
const crumbWidths = storedCrumbWidths.length < crumbCount ? measureCrumbWidths(children, crumbCount) : storedCrumbWidths;
|
|
54
|
-
// Icon button not yet rendered - use conservative fallback
|
|
55
|
-
if (iconButtonWidth === 0) {
|
|
56
|
+
const handleTruncationState = (crumbWidths, containerWidth, iconButtonWidth, gap) => {
|
|
57
|
+
const crumbCount = crumbWidths.length;
|
|
58
|
+
// Edge case: no crumbs
|
|
59
|
+
if (crumbCount === 0) {
|
|
56
60
|
return {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
},
|
|
61
|
-
crumbWidths
|
|
61
|
+
isTruncationRequired: false,
|
|
62
|
+
ellipsizeLastCrumb: false,
|
|
63
|
+
visibleCrumbCount: 0
|
|
62
64
|
};
|
|
63
65
|
}
|
|
64
|
-
const
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
isTruncationRequired: true,
|
|
69
|
-
visibleCrumbCount: visibleCount
|
|
70
|
-
},
|
|
71
|
-
crumbWidths
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Get crumb widths for total width calculation
|
|
76
|
-
* Factored out into its own function to reduce cognitive complexity
|
|
77
|
-
*/
|
|
78
|
-
const getCrumbWidths = (children, storedWidths, crumbCount, isCurrentlyTruncated) => {
|
|
79
|
-
if (storedWidths.length === crumbCount) {
|
|
80
|
-
return storedWidths; // Already have all widths
|
|
81
|
-
}
|
|
82
|
-
// The first child could be the icon button, so we don't want to measure it as part of the crumbs
|
|
83
|
-
const crumbElements = isCurrentlyTruncated ? children.slice(1) : children;
|
|
84
|
-
return crumbElements.map(crumbElement => crumbElement.offsetWidth);
|
|
85
|
-
};
|
|
86
|
-
/**
|
|
87
|
-
* Handle ≤3 crumbs case: Render all first, detect overflow, truncate if needed
|
|
88
|
-
*/
|
|
89
|
-
const handleConditionalTruncate = (children, context, isCurrentlyTruncated) => {
|
|
90
|
-
const {
|
|
91
|
-
containerWidth,
|
|
92
|
-
gap,
|
|
93
|
-
iconButtonWidth,
|
|
94
|
-
crumbCount,
|
|
95
|
-
storedCrumbWidths
|
|
96
|
-
} = context;
|
|
97
|
-
// Get crumb widths when all crumbs are visible (not truncated)
|
|
98
|
-
const crumbWidths = !isCurrentlyTruncated && children.length === crumbCount ? children.map(crumbElement => crumbElement.offsetWidth) // fresh measurement
|
|
99
|
-
: storedCrumbWidths; // Reuse stored
|
|
100
|
-
// Calculate total width to check for overflow
|
|
101
|
-
const widthsForCalculation = getCrumbWidths(children, crumbWidths, crumbCount, isCurrentlyTruncated);
|
|
102
|
-
const totalWidth = calculateTotalWidth(widthsForCalculation, gap);
|
|
103
|
-
const areCrumbsOverflowingWithoutTruncation = totalWidth > containerWidth;
|
|
104
|
-
// No overflow - show all crumbs
|
|
105
|
-
if (!areCrumbsOverflowingWithoutTruncation) {
|
|
66
|
+
const totalWidthAllCrumbs = calculateTotalWidth(crumbWidths, gap);
|
|
67
|
+
const availableWidthWithIcon = Math.max(0, containerWidth - iconButtonWidth - gap);
|
|
68
|
+
// Check if all crumbs fit without truncation (up to MAX_VISIBLE_CRUMBS)
|
|
69
|
+
if (crumbCount <= MAX_VISIBLE_CRUMBS && totalWidthAllCrumbs <= containerWidth) {
|
|
106
70
|
return {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
},
|
|
111
|
-
crumbWidths
|
|
71
|
+
isTruncationRequired: false,
|
|
72
|
+
ellipsizeLastCrumb: false,
|
|
73
|
+
visibleCrumbCount: crumbCount
|
|
112
74
|
};
|
|
113
75
|
}
|
|
114
|
-
//
|
|
115
|
-
|
|
116
|
-
if (iconButtonWidth === 0) {
|
|
76
|
+
// Single crumb: never show icon, just ellipsize if needed
|
|
77
|
+
if (crumbCount === 1) {
|
|
117
78
|
return {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
crumbWidths
|
|
79
|
+
isTruncationRequired: false,
|
|
80
|
+
visibleCrumbCount: 1,
|
|
81
|
+
ellipsizeLastCrumb: totalWidthAllCrumbs > containerWidth
|
|
123
82
|
};
|
|
124
83
|
}
|
|
125
|
-
|
|
126
|
-
const
|
|
84
|
+
// Calculate how many crumbs fit with the icon button
|
|
85
|
+
const visibleCrumbCount = calculateVisibleCrumbCount(crumbWidths, availableWidthWithIcon, gap, MAX_VISIBLE_CRUMBS);
|
|
86
|
+
// If only 1 crumb fits and it still doesn't fit fully, enable ellipsis
|
|
87
|
+
const lastCrumbWidth = crumbWidths[crumbWidths.length - 1];
|
|
88
|
+
const ellipsizeLastCrumb = visibleCrumbCount === 1 && lastCrumbWidth > availableWidthWithIcon;
|
|
127
89
|
return {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
},
|
|
132
|
-
crumbWidths
|
|
90
|
+
isTruncationRequired: true,
|
|
91
|
+
visibleCrumbCount,
|
|
92
|
+
ellipsizeLastCrumb
|
|
133
93
|
};
|
|
134
94
|
};
|
|
135
95
|
/**
|
|
@@ -141,79 +101,84 @@ const performTruncationCalculation = ({
|
|
|
141
101
|
measuredIconButtonWidth,
|
|
142
102
|
storedCrumbWidths,
|
|
143
103
|
crumbCount,
|
|
144
|
-
isTruncationRequiredBaseOnCrumbLength,
|
|
145
104
|
isTruncationRequired,
|
|
146
105
|
setState
|
|
147
106
|
}) => {
|
|
148
107
|
const containerWidth = container.clientWidth;
|
|
149
|
-
const children = Array.from(container.children);
|
|
150
108
|
const computedStyle = getComputedStyle(container);
|
|
151
109
|
const gap = parseFloat(computedStyle.gap) || 0;
|
|
110
|
+
const children = Array.from(container.children);
|
|
152
111
|
if (iconButtonRef.current) {
|
|
153
112
|
measuredIconButtonWidth.current = iconButtonRef.current.offsetWidth;
|
|
154
113
|
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
crumbCount
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
114
|
+
// When truncated, first child is icon button, so skip it
|
|
115
|
+
const crumbElements = isTruncationRequired ? children.slice(1) : children;
|
|
116
|
+
if (storedCrumbWidths.current.length < crumbCount && crumbElements.length > 0) {
|
|
117
|
+
const startIndex = crumbCount - crumbElements.length;
|
|
118
|
+
const isLastCrumbIncluded = startIndex + crumbElements.length === crumbCount;
|
|
119
|
+
const measuredWidths = measureCrumbWidths(crumbElements, isLastCrumbIncluded);
|
|
120
|
+
measuredWidths.forEach((width, i) => {
|
|
121
|
+
storedCrumbWidths.current[startIndex + i] = width;
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
if (storedCrumbWidths.current.length < crumbCount) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
setState(handleTruncationState(storedCrumbWidths.current, containerWidth, measuredIconButtonWidth.current, gap));
|
|
165
128
|
};
|
|
166
129
|
/**
|
|
167
|
-
* Hook
|
|
130
|
+
* Hook that calculates optimal breadcrumb truncation for folder-tree display.
|
|
168
131
|
*
|
|
169
|
-
*
|
|
170
|
-
*
|
|
171
|
-
* - **>3 crumbs**: Render truncated state immediately, show icon button + up to 3 crumbs
|
|
132
|
+
* Uses a cascading fallback strategy to show as many crumbs as possible without
|
|
133
|
+
* text ellipsis, falling back to ellipsis only as a last resort.
|
|
172
134
|
*
|
|
173
|
-
* @param containerRef - Ref to the
|
|
174
|
-
* @param crumbs - Array of breadcrumb items
|
|
175
|
-
* @param
|
|
176
|
-
* @returns Object containing wouldCrumbsOverflow, visibleCrumbCount, and iconButtonRef
|
|
135
|
+
* @param containerRef - Ref to the breadcrumb list container (ol element)
|
|
136
|
+
* @param crumbs - Array of breadcrumb items to display
|
|
137
|
+
* @param isMobile - Whether the breadcrumb is on a mobile device
|
|
177
138
|
*/
|
|
178
|
-
const useFolderTreeTruncation = (containerRef, crumbs,
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
const
|
|
139
|
+
const useFolderTreeTruncation = (containerRef, crumbs, isMobile) => {
|
|
140
|
+
const crumbCount = crumbs.length;
|
|
141
|
+
// Initial state: for 4+ crumbs, start truncated; otherwise show all
|
|
142
|
+
const initialState = {
|
|
143
|
+
isTruncationRequired: crumbCount > MAX_VISIBLE_CRUMBS,
|
|
144
|
+
ellipsizeLastCrumb: false,
|
|
145
|
+
visibleCrumbCount: Math.min(crumbCount, MAX_VISIBLE_CRUMBS)
|
|
146
|
+
};
|
|
147
|
+
const [state, setState] = useState(initialState);
|
|
182
148
|
const iconButtonRef = useRef(null);
|
|
183
|
-
//
|
|
184
|
-
const measuredIconButtonWidth = useRef(0);
|
|
149
|
+
// Cache for measured values to avoid re-measuring on every resize
|
|
185
150
|
const storedCrumbWidths = useRef([]);
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
151
|
+
const measuredIconButtonWidth = useRef(0);
|
|
152
|
+
const prevCrumbCount = useRef(crumbCount);
|
|
153
|
+
// Reset cache when crumbs change (user navigated)
|
|
154
|
+
if (prevCrumbCount.current !== crumbCount) {
|
|
189
155
|
storedCrumbWidths.current = [];
|
|
190
|
-
|
|
191
|
-
|
|
156
|
+
measuredIconButtonWidth.current = 0;
|
|
157
|
+
prevCrumbCount.current = crumbCount;
|
|
158
|
+
setState(initialState);
|
|
192
159
|
}
|
|
193
160
|
const calculateTruncation = useCallback(() => {
|
|
194
161
|
const container = containerRef.current;
|
|
195
162
|
if (!container) {
|
|
196
163
|
return;
|
|
197
164
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
isTruncationRequired: state.isTruncationRequired,
|
|
207
|
-
setState
|
|
208
|
-
});
|
|
165
|
+
performTruncationCalculation({
|
|
166
|
+
container,
|
|
167
|
+
iconButtonRef,
|
|
168
|
+
measuredIconButtonWidth,
|
|
169
|
+
storedCrumbWidths,
|
|
170
|
+
crumbCount,
|
|
171
|
+
isTruncationRequired: state.isTruncationRequired,
|
|
172
|
+
setState
|
|
209
173
|
});
|
|
210
|
-
}, [containerRef,
|
|
211
|
-
|
|
174
|
+
}, [containerRef, crumbCount, state.isTruncationRequired]);
|
|
175
|
+
useLayoutEffect(() => {
|
|
212
176
|
// Reset state when truncation is disabled (e.g., responsive breakpoint triggers mobile view)
|
|
213
|
-
if (
|
|
177
|
+
if (isMobile) {
|
|
214
178
|
setState({
|
|
215
179
|
isTruncationRequired: false,
|
|
216
|
-
|
|
180
|
+
ellipsizeLastCrumb: false,
|
|
181
|
+
visibleCrumbCount: crumbCount
|
|
217
182
|
});
|
|
218
183
|
measuredIconButtonWidth.current = 0;
|
|
219
184
|
storedCrumbWidths.current = [];
|
|
@@ -230,11 +195,8 @@ const useFolderTreeTruncation = (containerRef, crumbs, isEnabled) => {
|
|
|
230
195
|
calculateTruncation();
|
|
231
196
|
return () => {
|
|
232
197
|
observer.disconnect();
|
|
233
|
-
if (animationFrameId.current !== null) {
|
|
234
|
-
cancelAnimationFrame(animationFrameId.current);
|
|
235
|
-
}
|
|
236
198
|
};
|
|
237
|
-
}, [
|
|
199
|
+
}, [calculateTruncation, containerRef, crumbCount, isMobile]);
|
|
238
200
|
return {
|
|
239
201
|
...state,
|
|
240
202
|
iconButtonRef
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"card":"bp_card_module_card--
|
|
2
|
+
var styles = {"card":"bp_card_module_card--65268","dropshadow-1":"bp_card_module_dropshadow-1--65268","dropshadow-3":"bp_card_module_dropshadow-3--65268"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"content":"bp_card_tooltip_module_content--
|
|
2
|
+
var styles = {"content":"bp_card_tooltip_module_content--a00fb","card":"bp_card_tooltip_module_card--a00fb"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"option":"bp_checkbox_module_option--
|
|
2
|
+
var styles = {"option":"bp_checkbox_module_option--18773","checkbox":"bp_checkbox_module_checkbox--18773","indicator":"bp_checkbox_module_indicator--18773","label":"bp_checkbox_module_label--18773","description":"bp_checkbox_module_description--18773","disabled":"bp_checkbox_module_disabled--18773"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"collapsibleSection":"bp_collapsible_section_module_collapsibleSection--
|
|
2
|
+
var styles = {"collapsibleSection":"bp_collapsible_section_module_collapsibleSection--acc50","collapsibleSectionHeader":"bp_collapsible_section_module_collapsibleSectionHeader--acc50","collapsibleSectionHeaderArrow":"bp_collapsible_section_module_collapsibleSectionHeaderArrow--acc50","collapsibleSectionContent":"bp_collapsible_section_module_collapsibleSectionContent--acc50","collapsibleSectionBody":"bp_collapsible_section_module_collapsibleSectionBody--acc50"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_combobox_module_container--
|
|
2
|
+
var styles = {"container":"bp_combobox_module_container--7afd1","label":"bp_combobox_module_label--7afd1","textInput":"bp_combobox_module_textInput--7afd1","popover":"bp_combobox_module_popover--7afd1","disabled":"bp_combobox_module_disabled--7afd1","hiddenLabel":"bp_combobox_module_hiddenLabel--7afd1","comboboxContainer":"bp_combobox_module_comboboxContainer--7afd1","withComboboxButtons":"bp_combobox_module_withComboboxButtons--7afd1","error":"bp_combobox_module_error--7afd1","textInputWrapper":"bp_combobox_module_textInputWrapper--7afd1","comboboxButtons":"bp_combobox_module_comboboxButtons--7afd1","withChips":"bp_combobox_module_withChips--7afd1","inlineError":"bp_combobox_module_inlineError--7afd1","option":"bp_combobox_module_option--7afd1","indicator":"bp_combobox_module_indicator--7afd1","indicatorIcon":"bp_combobox_module_indicatorIcon--7afd1","optionWithIndicator":"bp_combobox_module_optionWithIndicator--7afd1","loadingIndicator":"bp_combobox_module_loadingIndicator--7afd1"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -204,6 +204,10 @@ export interface ComboboxBaseProps<Multiple extends boolean, FreeInput extends b
|
|
|
204
204
|
* Callback used when combobox input/textarea loses focus
|
|
205
205
|
*/
|
|
206
206
|
onBlur?: (event: React.FocusEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
207
|
+
/**
|
|
208
|
+
* Callback when text is pasted into the input
|
|
209
|
+
*/
|
|
210
|
+
onPaste?: React.ClipboardEventHandler<HTMLInputElement>;
|
|
207
211
|
/**
|
|
208
212
|
* aria-label passed to the Combobox clear button. If not provided, the clear button is not shown.
|
|
209
213
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_combobox_group_module_container--
|
|
2
|
+
var styles = {"container":"bp_combobox_group_module_container--ea988","trailing":"bp_combobox_group_module_trailing--ea988","leading":"bp_combobox_group_module_leading--ea988","label":"bp_combobox_group_module_label--ea988","comboboxContainer":"bp_combobox_group_module_comboboxContainer--ea988","comboboxGroupcontainer":"bp_combobox_group_module_comboboxGroupcontainer--ea988","disabled":"bp_combobox_group_module_disabled--ea988","errorCombobox":"bp_combobox_group_module_errorCombobox--ea988","errorSelect":"bp_combobox_group_module_errorSelect--ea988","selectHasFocus":"bp_combobox_group_module_selectHasFocus--ea988","comboboxHasFocus":"bp_combobox_group_module_comboboxHasFocus--ea988"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -14,7 +14,8 @@ const ContentCardBody = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
14
14
|
const {
|
|
15
15
|
enableModernizedComponents
|
|
16
16
|
} = useBlueprintModernization();
|
|
17
|
-
const variant = enableModernizedComponents ? '
|
|
17
|
+
const variant = enableModernizedComponents ? 'bodySmall' : 'bodyDefault';
|
|
18
|
+
const color = enableModernizedComponents ? 'textOnLightSecondary' : 'textOnLightDefault';
|
|
18
19
|
return jsx("div", {
|
|
19
20
|
className: clsx(styles.cardBody, className),
|
|
20
21
|
children: jsx(Text, {
|
|
@@ -22,7 +23,7 @@ const ContentCardBody = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
22
23
|
ref: forwardedRef,
|
|
23
24
|
as: "p",
|
|
24
25
|
className: styles.cardBodyText,
|
|
25
|
-
color:
|
|
26
|
+
color: color,
|
|
26
27
|
variant: variant,
|
|
27
28
|
children: children
|
|
28
29
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"card":"bp_content_card_module_card--
|
|
2
|
+
var styles = {"card":"bp_content_card_module_card--40c1e","ghostCard":"bp_content_card_module_ghostCard--40c1e","cardContent":"bp_content_card_module_cardContent--40c1e","cardTitle":"bp_content_card_module_cardTitle--40c1e","cardTitleText":"bp_content_card_module_cardTitleText--40c1e","cardBody":"bp_content_card_module_cardBody--40c1e","cardBodyText":"bp_content_card_module_cardBodyText--40c1e","cardIcon":"bp_content_card_module_cardIcon--40c1e","cardBackground":"bp_content_card_module_cardBackground--40c1e","image":"bp_content_card_module_image--40c1e","iconGhost":"bp_content_card_module_iconGhost--40c1e","titleGhost":"bp_content_card_module_titleGhost--40c1e","bodyGhost":"bp_content_card_module_bodyGhost--40c1e","pillGhostContainer":"bp_content_card_module_pillGhostContainer--40c1e","pillGhost":"bp_content_card_module_pillGhost--40c1e"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"dataTableWrapper":"bp_data_table_module_dataTableWrapper--
|
|
2
|
+
var styles = {"dataTableWrapper":"bp_data_table_module_dataTableWrapper--366b5","isScrolledX":"bp_data_table_module_isScrolledX--366b5","hideActionWrapperRight":"bp_data_table_module_hideActionWrapperRight--366b5"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"datePicker":"bp_date_picker_module_datePicker--
|
|
2
|
+
var styles = {"datePicker":"bp_date_picker_module_datePicker--ba00e","label":"bp_date_picker_module_label--ba00e","group":"bp_date_picker_module_group--ba00e","disabled":"bp_date_picker_module_disabled--ba00e","groupContainer":"bp_date_picker_module_groupContainer--ba00e","error":"bp_date_picker_module_error--ba00e","groupContainerInput":"bp_date_picker_module_groupContainerInput--ba00e","groupContainerInputSegment":"bp_date_picker_module_groupContainerInputSegment--ba00e","button":"bp_date_picker_module_button--ba00e","clear":"bp_date_picker_module_clear--ba00e","inlineError":"bp_date_picker_module_inlineError--ba00e","datePickerPopoverContent":"bp_date_picker_module_datePickerPopoverContent--ba00e"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"content":"bp_guided_tooltip_module_content--
|
|
2
|
+
var styles = {"content":"bp_guided_tooltip_module_content--bc807","body":"bp_guided_tooltip_module_body--bc807","noTitle":"bp_guided_tooltip_module_noTitle--bc807","title":"bp_guided_tooltip_module_title--bc807","footer":"bp_guided_tooltip_module_footer--bc807","actionButtons":"bp_guided_tooltip_module_actionButtons--bc807","stepsIndicator":"bp_guided_tooltip_module_stepsIndicator--bc807","closeButton":"bp_guided_tooltip_module_closeButton--bc807","arrow":"bp_guided_tooltip_module_arrow--bc807","icon":"bp_guided_tooltip_module_icon--bc807","illustration":"bp_guided_tooltip_module_illustration--bc807"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|