@carbon/react 1.108.0 → 1.109.0-rc.1
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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +902 -902
- package/es/components/ComboBox/ComboBox.js +28 -1
- package/es/components/ComposedModal/ComposedModal.d.ts +8 -0
- package/es/components/ComposedModal/ComposedModal.js +33 -18
- package/es/components/ComposedModal/ComposedModalContext.d.ts +12 -0
- package/es/components/ComposedModal/ComposedModalContext.js +18 -0
- package/es/components/ComposedModal/ModalHeader.js +29 -1
- package/es/components/DataTable/DataTable.d.ts +9 -3
- package/es/components/DataTable/DataTable.js +10 -8
- package/es/components/DataTable/TableToolbar.d.ts +8 -2
- package/es/components/DataTable/TableToolbar.js +21 -11
- package/es/components/DataTable/TableToolbarMenu.d.ts +5 -1
- package/es/components/DataTable/TableToolbarMenu.js +12 -2
- package/es/components/DataTable/TableToolbarSearch.d.ts +2 -6
- package/es/components/DataTable/TableToolbarSearch.js +5 -1
- package/es/components/Modal/Modal.js +14 -7
- package/es/components/Search/Search.js +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/internal/FloatingMenu.js +5 -3
- package/lib/components/ComboBox/ComboBox.js +28 -1
- package/lib/components/ComposedModal/ComposedModal.d.ts +8 -0
- package/lib/components/ComposedModal/ComposedModal.js +32 -17
- package/lib/components/ComposedModal/ComposedModalContext.d.ts +12 -0
- package/lib/components/ComposedModal/ComposedModalContext.js +18 -0
- package/lib/components/ComposedModal/ModalHeader.js +28 -0
- package/lib/components/DataTable/DataTable.d.ts +9 -3
- package/lib/components/DataTable/DataTable.js +10 -8
- package/lib/components/DataTable/TableToolbar.d.ts +8 -2
- package/lib/components/DataTable/TableToolbar.js +20 -9
- package/lib/components/DataTable/TableToolbarMenu.d.ts +5 -1
- package/lib/components/DataTable/TableToolbarMenu.js +12 -2
- package/lib/components/DataTable/TableToolbarSearch.d.ts +2 -6
- package/lib/components/DataTable/TableToolbarSearch.js +5 -1
- package/lib/components/Modal/Modal.js +13 -6
- package/lib/components/Search/Search.js +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +2 -0
- package/lib/internal/FloatingMenu.js +5 -3
- package/package.json +6 -6
|
@@ -27,10 +27,10 @@ const require_events = require("../../tools/events.js");
|
|
|
27
27
|
const require_index$5 = require("../Layer/index.js");
|
|
28
28
|
const require_index$6 = require("../InlineLoading/index.js");
|
|
29
29
|
const require_toggleClass = require("../../tools/toggleClass.js");
|
|
30
|
-
const require_requiredIfGivenPropIsTruthy = require("../../prop-types/requiredIfGivenPropIsTruthy.js");
|
|
31
30
|
const require_wrapFocus = require("../../internal/wrapFocus.js");
|
|
32
31
|
const require_Dialog = require("../Dialog/Dialog.js");
|
|
33
32
|
const require_isTopmostVisibleModal = require("./isTopmostVisibleModal.js");
|
|
33
|
+
const require_requiredIfGivenPropIsTruthy = require("../../prop-types/requiredIfGivenPropIsTruthy.js");
|
|
34
34
|
const require_usePreviousValue = require("../../internal/usePreviousValue.js");
|
|
35
35
|
const require_ModalPresence = require("./ModalPresence.js");
|
|
36
36
|
let classnames = require("classnames");
|
|
@@ -171,11 +171,18 @@ const ModalDialog = react.default.forwardRef(function ModalDialog({ "aria-label"
|
|
|
171
171
|
[`${prefix}--modal-container--${size}`]: size,
|
|
172
172
|
[`${prefix}--modal-container--full-width`]: isFullWidth
|
|
173
173
|
});
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
174
|
+
const currentScrollHeight = contentRef.current?.scrollHeight || 0;
|
|
175
|
+
const currentClientHeight = contentRef.current?.clientHeight || 0;
|
|
176
|
+
const [isScrollable, setIsScrollable] = (0, react.useState)(currentScrollHeight > currentClientHeight);
|
|
177
|
+
(0, react.useEffect)(() => {
|
|
178
|
+
if (!contentRef.current) {
|
|
179
|
+
setIsScrollable(false);
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
const diff = contentRef.current.scrollHeight - contentRef.current.clientHeight;
|
|
183
|
+
if (diff > 5) setIsScrollable(true);
|
|
184
|
+
else if (diff < -5) setIsScrollable(false);
|
|
185
|
+
}, [currentScrollHeight, currentClientHeight]);
|
|
179
186
|
const contentClasses = (0, classnames.default)(`${prefix}--modal-content`, {
|
|
180
187
|
[`${prefix}--modal-scroll-content`]: hasScrollingContent || isScrollable,
|
|
181
188
|
[`${prefix}--modal-scroll-content--no-fade`]: height <= 300
|
|
@@ -114,7 +114,7 @@ const Search = react.default.forwardRef(({ autoComplete = "off", className, clos
|
|
|
114
114
|
});
|
|
115
115
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
116
116
|
role: "search",
|
|
117
|
-
"aria-
|
|
117
|
+
"aria-labelledby": searchId,
|
|
118
118
|
className: searchClasses,
|
|
119
119
|
children: [
|
|
120
120
|
onExpand && !isExpanded ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Tooltip.Tooltip, {
|
package/lib/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from './components/FormLabel';
|
|
|
46
46
|
export * from './components/Grid';
|
|
47
47
|
export * from './components/Icon/Icon.Skeleton';
|
|
48
48
|
export * from './components/IdPrefix';
|
|
49
|
+
export { InlineCheckbox } from './components/InlineCheckbox';
|
|
49
50
|
export * from './components/InlineLoading';
|
|
50
51
|
export * from './components/Link';
|
|
51
52
|
export * from './components/ListItem';
|
package/lib/index.js
CHANGED
|
@@ -83,6 +83,7 @@ const require_TableExpandedRow = require("./components/DataTable/TableExpandedRo
|
|
|
83
83
|
const require_TableHead = require("./components/DataTable/TableHead.js");
|
|
84
84
|
const require_TableHeader = require("./components/DataTable/TableHeader.js");
|
|
85
85
|
const require_TableRow = require("./components/DataTable/TableRow.js");
|
|
86
|
+
const require_InlineCheckbox = require("./components/InlineCheckbox/InlineCheckbox.js");
|
|
86
87
|
const require_TableSelectAll = require("./components/DataTable/TableSelectAll.js");
|
|
87
88
|
const require_RadioButton = require("./components/RadioButton/RadioButton.js");
|
|
88
89
|
const require_TableSelectRow = require("./components/DataTable/TableSelectRow.js");
|
|
@@ -366,6 +367,7 @@ exports.IconSkeleton = require_Icon_Skeleton.default || require_Icon_Skeleton;
|
|
|
366
367
|
exports.IconSwitch = require_IconSwitch.default || require_IconSwitch;
|
|
367
368
|
exports.IconTab = require_Tabs.IconTab;
|
|
368
369
|
exports.IdPrefix = require_index$13.IdPrefix;
|
|
370
|
+
exports.InlineCheckbox = require_InlineCheckbox.default || require_InlineCheckbox;
|
|
369
371
|
exports.InlineLoading = require_InlineLoading.default || require_InlineLoading;
|
|
370
372
|
exports.InlineNotification = require_Notification.InlineNotification;
|
|
371
373
|
exports.Layer = require_index$8.Layer;
|
|
@@ -116,7 +116,10 @@ const FloatingMenu = ({ children, flipped, focusTrap, menuDirection = DIRECTION_
|
|
|
116
116
|
position: getComputedStyle(target()).position
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
|
|
119
|
+
setFloatingPosition((prev) => {
|
|
120
|
+
if (prev && prev.left === newFloatingPosition.left && prev.top === newFloatingPosition.top) return prev;
|
|
121
|
+
return newFloatingPosition;
|
|
122
|
+
});
|
|
120
123
|
if (!isAdjustment) {
|
|
121
124
|
const newMenuSize = menuBody.getBoundingClientRect();
|
|
122
125
|
if (newMenuSize.width !== menuSize.width || newMenuSize.height !== menuSize.height) updateMenuPosition(true);
|
|
@@ -128,8 +131,7 @@ const FloatingMenu = ({ children, flipped, focusTrap, menuDirection = DIRECTION_
|
|
|
128
131
|
menuDirection,
|
|
129
132
|
flipped,
|
|
130
133
|
target,
|
|
131
|
-
updateOrientation
|
|
132
|
-
floatingPosition
|
|
134
|
+
updateOrientation
|
|
133
135
|
]);
|
|
134
136
|
const focusMenuContent = (menuBody) => {
|
|
135
137
|
const primaryFocusNode = selectorPrimaryFocus ? menuBody.querySelector(selectorPrimaryFocus) : null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.109.0-rc.1",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@babel/runtime": "^7.27.3",
|
|
55
55
|
"@carbon/feature-flags": "^1.3.0",
|
|
56
|
-
"@carbon/icons-react": "^11.
|
|
56
|
+
"@carbon/icons-react": "^11.82.0-rc.0",
|
|
57
57
|
"@carbon/layout": "^11.53.0",
|
|
58
|
-
"@carbon/styles": "^1.
|
|
58
|
+
"@carbon/styles": "^1.108.0-rc.0",
|
|
59
59
|
"@carbon/utilities": "^0.20.0",
|
|
60
60
|
"@floating-ui/react": "^0.27.4",
|
|
61
61
|
"@ibm/telemetry-js": "^1.5.0",
|
|
@@ -79,8 +79,8 @@
|
|
|
79
79
|
"@babel/preset-react": "^7.27.1",
|
|
80
80
|
"@babel/preset-typescript": "^7.27.1",
|
|
81
81
|
"@carbon/test-utils": "^10.41.0",
|
|
82
|
-
"@carbon/themes": "^11.
|
|
83
|
-
"@figma/code-connect": "^1.4.
|
|
82
|
+
"@carbon/themes": "^11.75.0-rc.0",
|
|
83
|
+
"@figma/code-connect": "^1.4.5",
|
|
84
84
|
"@stackblitz/sdk": "^1.11.0",
|
|
85
85
|
"@storybook/addon-a11y": "^10.3.5",
|
|
86
86
|
"@storybook/addon-docs": "^10.3.5",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"**/*.scss",
|
|
126
126
|
"**/*.css"
|
|
127
127
|
],
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "14a776201a405c2fdd67b0dad9dfe4f136b831f8"
|
|
129
129
|
}
|