@carbon/react 1.106.0-rc.0 → 1.107.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/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +1006 -971
- package/es/components/Accordion/AccordionItem.d.ts +2 -2
- package/es/components/Button/Button.js +1 -1
- package/es/components/Checkbox/Checkbox.js +2 -1
- package/es/components/CheckboxGroup/CheckboxGroup.js +2 -1
- package/es/components/ComboBox/ComboBox.d.ts +1 -1
- package/es/components/ComboBox/ComboBox.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +24 -15
- package/es/components/DataTable/DataTable.d.ts +3 -3
- package/es/components/DataTable/TableActionList.d.ts +1 -1
- package/es/components/DataTable/TableHead.d.ts +1 -1
- package/es/components/DataTable/TableSlugRow.d.ts +2 -2
- package/es/components/DataTable/TableSlugRow.js +8 -11
- package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/es/components/DataTable/TableToolbarSearch.d.ts +5 -1
- package/es/components/DatePicker/DatePicker.js +15 -13
- package/es/components/DatePicker/plugins/fixEventsPlugin.js +2 -3
- package/es/components/DatePickerInput/DatePickerInput.js +9 -2
- package/es/components/Dropdown/Dropdown.d.ts +1 -1
- package/es/components/FluidTimePicker/FluidTimePicker.d.ts +1 -1
- package/es/components/FluidTimePicker/FluidTimePicker.js +6 -4
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +4 -0
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -1
- package/es/components/FluidTimePickerSelect/index.js +18 -0
- package/es/components/Grid/CSSGrid.js +11 -6
- package/es/components/Grid/Column.d.ts +2 -2
- package/es/components/Grid/ColumnHang.d.ts +3 -3
- package/es/components/Grid/ColumnHang.js +1 -1
- package/es/components/Grid/FlexGrid.js +5 -3
- package/es/components/Grid/Grid.js +2 -1
- package/es/components/Grid/GridTypes.d.ts +5 -0
- package/es/components/Grid/Row.d.ts +3 -3
- package/es/components/Grid/Row.js +1 -1
- package/es/components/Menu/Menu.js +1 -1
- package/es/components/Menu/MenuItem.js +4 -0
- package/es/components/Modal/Modal.js +3 -0
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +3 -2
- package/es/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.js +11 -12
- package/es/components/Pagination/Pagination.d.ts +1 -1
- package/es/components/Pagination/Pagination.js +2 -0
- package/es/components/Popover/index.js +14 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +8 -6
- package/es/components/Search/Search.Skeleton.d.ts +12 -3
- package/es/components/Search/Search.Skeleton.js +16 -8
- package/es/components/Search/Search.d.ts +1 -1
- package/es/components/Search/Search.js +4 -4
- package/es/components/Select/Select.d.ts +1 -1
- package/es/components/Select/Select.js +7 -6
- package/es/components/Slider/Slider.js +46 -62
- package/es/components/Tabs/Tabs.js +2 -2
- package/es/components/TextArea/TextArea.js +5 -2
- package/es/components/TextInput/ControlledPasswordInput.js +2 -1
- package/es/components/TextInput/PasswordInput.d.ts +2 -2
- package/es/components/TextInput/PasswordInput.js +33 -21
- package/es/components/TextInput/TextInput.Skeleton.d.ts +10 -2
- package/es/components/TextInput/TextInput.Skeleton.js +10 -4
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +39 -30
- package/es/components/TextInput/util.d.ts +1 -0
- package/es/components/TextInput/util.js +1 -1
- package/es/components/Theme/index.d.ts +2 -2
- package/es/components/Theme/index.js +3 -3
- package/es/components/TimePicker/TimePicker.js +5 -2
- package/es/components/TreeView/TreeNode.js +2 -2
- package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/es/components/UIShell/HeaderMenu.d.ts +1 -1
- package/es/components/UIShell/HeaderMenu.js +5 -3
- package/es/index.js +2 -2
- package/es/internal/FloatingMenu.d.ts +5 -1
- package/es/internal/hasHelperText.d.ts +8 -0
- package/es/internal/hasHelperText.js +11 -0
- package/es/tools/wrapComponent.d.ts +3 -3
- package/es/tools/wrapComponent.js +1 -1
- package/lib/components/Accordion/AccordionItem.d.ts +2 -2
- package/lib/components/Button/Button.js +1 -1
- package/lib/components/Checkbox/Checkbox.js +2 -1
- package/lib/components/CheckboxGroup/CheckboxGroup.js +2 -1
- package/lib/components/ComboBox/ComboBox.d.ts +1 -1
- package/lib/components/ComboBox/ComboBox.js +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +22 -13
- package/lib/components/DataTable/DataTable.d.ts +3 -3
- package/lib/components/DataTable/TableActionList.d.ts +1 -1
- package/lib/components/DataTable/TableHead.d.ts +1 -1
- package/lib/components/DataTable/TableSlugRow.d.ts +2 -2
- package/lib/components/DataTable/TableSlugRow.js +7 -10
- package/lib/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarSearch.d.ts +5 -1
- package/lib/components/DatePicker/DatePicker.js +15 -13
- package/lib/components/DatePicker/plugins/fixEventsPlugin.js +1 -2
- package/lib/components/DatePickerInput/DatePickerInput.js +9 -2
- package/lib/components/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/FluidTimePicker/FluidTimePicker.d.ts +1 -1
- package/lib/components/FluidTimePicker/FluidTimePicker.js +5 -3
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +4 -0
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -1
- package/lib/components/FluidTimePickerSelect/index.js +17 -0
- package/lib/components/Grid/CSSGrid.js +11 -6
- package/lib/components/Grid/Column.d.ts +2 -2
- package/lib/components/Grid/ColumnHang.d.ts +3 -3
- package/lib/components/Grid/ColumnHang.js +1 -1
- package/lib/components/Grid/FlexGrid.js +5 -3
- package/lib/components/Grid/Grid.js +2 -1
- package/lib/components/Grid/GridTypes.d.ts +5 -0
- package/lib/components/Grid/Row.d.ts +3 -3
- package/lib/components/Grid/Row.js +1 -1
- package/lib/components/Menu/Menu.js +1 -1
- package/lib/components/Menu/MenuItem.js +4 -0
- package/lib/components/Modal/Modal.js +3 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +3 -2
- package/lib/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +10 -11
- package/lib/components/Pagination/Pagination.d.ts +1 -1
- package/lib/components/Pagination/Pagination.js +2 -0
- package/lib/components/Popover/index.js +14 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +7 -5
- package/lib/components/Search/Search.Skeleton.d.ts +12 -3
- package/lib/components/Search/Search.Skeleton.js +15 -7
- package/lib/components/Search/Search.d.ts +1 -1
- package/lib/components/Search/Search.js +4 -4
- package/lib/components/Select/Select.d.ts +1 -1
- package/lib/components/Select/Select.js +7 -6
- package/lib/components/Slider/Slider.js +46 -62
- package/lib/components/Tabs/Tabs.js +2 -2
- package/lib/components/TextArea/TextArea.js +5 -2
- package/lib/components/TextInput/ControlledPasswordInput.js +2 -1
- package/lib/components/TextInput/PasswordInput.d.ts +2 -2
- package/lib/components/TextInput/PasswordInput.js +33 -21
- package/lib/components/TextInput/TextInput.Skeleton.d.ts +10 -2
- package/lib/components/TextInput/TextInput.Skeleton.js +10 -4
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.js +39 -30
- package/lib/components/TextInput/util.d.ts +1 -0
- package/lib/components/TextInput/util.js +1 -1
- package/lib/components/Theme/index.d.ts +2 -2
- package/lib/components/Theme/index.js +2 -2
- package/lib/components/TimePicker/TimePicker.js +5 -2
- package/lib/components/TreeView/TreeNode.js +1 -1
- package/lib/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenu.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenu.js +5 -3
- package/lib/index.js +2 -2
- package/lib/internal/FloatingMenu.d.ts +5 -1
- package/lib/internal/hasHelperText.d.ts +8 -0
- package/lib/internal/hasHelperText.js +11 -0
- package/lib/tools/wrapComponent.d.ts +3 -3
- package/lib/tools/wrapComponent.js +1 -1
- package/package.json +8 -8
- package/telemetry.yml +1 -0
|
@@ -13,7 +13,7 @@ declare const translationIds: {
|
|
|
13
13
|
readonly 'carbon.table.toolbar.search.placeholder': "carbon.table.toolbar.search.placeholder";
|
|
14
14
|
};
|
|
15
15
|
type TranslationKey = keyof typeof translationIds;
|
|
16
|
-
type ExcludedInheritedProps = 'defaultValue' | 'labelText' | 'onBlur' | 'onChange' | 'onExpand' | 'onFocus' | 'tabIndex';
|
|
16
|
+
type ExcludedInheritedProps = 'defaultValue' | 'labelText' | 'onBlur' | 'onChange' | 'onExpand' | 'onFocus' | 'tabIndex' | 'size';
|
|
17
17
|
export type TableToolbarSearchHandleExpand = (event: FocusEvent<HTMLInputElement>, newValue?: boolean) => void;
|
|
18
18
|
/**
|
|
19
19
|
* @deprecated Passing `''` as the event sentinel is legacy compatibility
|
|
@@ -69,6 +69,10 @@ export interface TableToolbarSearchProps extends Omit<SearchProps, ExcludedInher
|
|
|
69
69
|
* Provide an optional className for the overall container of the Search
|
|
70
70
|
*/
|
|
71
71
|
searchContainerClass?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Specify the size of the Search
|
|
74
|
+
*/
|
|
75
|
+
size?: 'sm' | 'md' | 'lg';
|
|
72
76
|
tabIndex?: number | string;
|
|
73
77
|
}
|
|
74
78
|
declare const TableToolbarSearch: {
|
|
@@ -45,6 +45,7 @@ function initializeWeekdayShorthand() {
|
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
const forEach = Array.prototype.forEach;
|
|
48
|
+
const defaultAriaDateFormat = "l, F j, Y";
|
|
48
49
|
/**
|
|
49
50
|
* @param {number} monthNumber The month number.
|
|
50
51
|
* @param {boolean} shorthand `true` to use shorthand month.
|
|
@@ -170,7 +171,6 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
|
|
|
170
171
|
const lastFocusedField = (0, react.useRef)(null);
|
|
171
172
|
const savedOnChange = require_useSavedCallback.useSavedCallback(onChange);
|
|
172
173
|
const savedOnOpen = require_useSavedCallback.useSavedCallback(onOpen);
|
|
173
|
-
const effectiveWarn = warn && !invalid;
|
|
174
174
|
const wrapperRef = (0, react.useRef)(null);
|
|
175
175
|
const datePickerClasses = (0, classnames.default)(`${prefix}--date-picker`, {
|
|
176
176
|
[`${prefix}--date-picker--short`]: short,
|
|
@@ -182,31 +182,35 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
|
|
|
182
182
|
});
|
|
183
183
|
const wrapperClasses = (0, classnames.default)(`${prefix}--form-item`, { [String(className)]: className });
|
|
184
184
|
const childrenWithProps = react.default.Children.toArray(children).map((child, index) => {
|
|
185
|
+
const childInvalid = child.props?.invalid;
|
|
186
|
+
const childWarn = child.props?.warn;
|
|
187
|
+
const mergedInvalid = invalid ?? childInvalid;
|
|
188
|
+
const mergedWarn = mergedInvalid ? false : warn ?? childWarn;
|
|
185
189
|
if (index === 0 && require_utils.isComponentElement(child, require_index.default)) return react.default.cloneElement(child, {
|
|
186
190
|
datePickerType,
|
|
187
191
|
ref: startInputField,
|
|
188
192
|
readOnly,
|
|
189
|
-
invalid,
|
|
190
|
-
warn:
|
|
193
|
+
invalid: mergedInvalid,
|
|
194
|
+
warn: mergedWarn
|
|
191
195
|
});
|
|
192
196
|
if (index === 1 && require_utils.isComponentElement(child, require_index.default)) return react.default.cloneElement(child, {
|
|
193
197
|
datePickerType,
|
|
194
198
|
ref: endInputField,
|
|
195
199
|
readOnly,
|
|
196
|
-
invalid,
|
|
197
|
-
warn:
|
|
200
|
+
invalid: mergedInvalid,
|
|
201
|
+
warn: mergedWarn
|
|
198
202
|
});
|
|
199
203
|
if (index === 0) return react.default.cloneElement(child, {
|
|
200
204
|
ref: startInputField,
|
|
201
205
|
readOnly,
|
|
202
|
-
invalid,
|
|
203
|
-
warn:
|
|
206
|
+
invalid: mergedInvalid,
|
|
207
|
+
warn: mergedWarn
|
|
204
208
|
});
|
|
205
209
|
if (index === 1) return react.default.cloneElement(child, {
|
|
206
210
|
ref: endInputField,
|
|
207
211
|
readOnly,
|
|
208
|
-
invalid,
|
|
209
|
-
warn:
|
|
212
|
+
invalid: mergedInvalid,
|
|
213
|
+
warn: mergedWarn
|
|
210
214
|
});
|
|
211
215
|
});
|
|
212
216
|
(0, react.useEffect)(() => {
|
|
@@ -261,6 +265,7 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
|
|
|
261
265
|
inline: inline ?? false,
|
|
262
266
|
onClose: onCalendarClose,
|
|
263
267
|
disableMobile: true,
|
|
268
|
+
ariaDateFormat: defaultAriaDateFormat,
|
|
264
269
|
defaultDate: value,
|
|
265
270
|
closeOnSelect,
|
|
266
271
|
mode: datePickerType,
|
|
@@ -345,7 +350,6 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
|
|
|
345
350
|
const { target } = event;
|
|
346
351
|
if (target === start) lastStartValue.current = start.value;
|
|
347
352
|
if (start.value !== "") return;
|
|
348
|
-
if (!calendar.selectedDates) return;
|
|
349
353
|
if (calendar.selectedDates.length === 0) return;
|
|
350
354
|
}
|
|
351
355
|
function handleKeyPress(event) {
|
|
@@ -427,9 +431,7 @@ const DatePicker = (0, react.forwardRef)((props, ref) => {
|
|
|
427
431
|
}, [value, startInputField]);
|
|
428
432
|
(0, react.useEffect)(() => {
|
|
429
433
|
if (calendarRef.current?.set) {
|
|
430
|
-
if (value
|
|
431
|
-
if (calendarRef.current.selectedDates.length > 0) calendarRef.current.clear();
|
|
432
|
-
} else calendarRef.current.setDate(value);
|
|
434
|
+
if (!require_utils$1.isEmptyDateValue(value) && (!Array.isArray(value) || value.length > 0 && !value.every(require_utils$1.isEmptyDateValue))) calendarRef.current.setDate(value);
|
|
433
435
|
updateClassNames(calendarRef.current, prefix);
|
|
434
436
|
} else if (!calendarRef.current && typeof value !== "undefined" && value !== null) startInputField.current.value = value;
|
|
435
437
|
}, [
|
|
@@ -52,8 +52,7 @@ const fixEventsPlugin = (config) => (fp) => {
|
|
|
52
52
|
if (inputTo === target && fp.config.closeOnSelect) requestAnimationFrame(() => {
|
|
53
53
|
fp.close();
|
|
54
54
|
});
|
|
55
|
-
} else if (require_match.match(event, require_keys.
|
|
56
|
-
else if (require_match.match(event, require_keys.ArrowDown)) {
|
|
55
|
+
} else if (require_match.match(event, require_keys.ArrowDown)) {
|
|
57
56
|
event.preventDefault();
|
|
58
57
|
fp.open();
|
|
59
58
|
} else if (!fp.config.allowInput) {
|
|
@@ -84,15 +84,22 @@ const DatePickerInput = (0, react.forwardRef)((props, ref) => {
|
|
|
84
84
|
[`${prefix}--date-picker--fluid--warn`]: isFluid && normalizedProps.warn
|
|
85
85
|
});
|
|
86
86
|
const datePickerInputHelperId = !helperText ? void 0 : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
|
|
87
|
+
let ariaDescribedBy;
|
|
88
|
+
if (normalizedProps.invalid) ariaDescribedBy = normalizedProps.invalidId;
|
|
89
|
+
else if (normalizedProps.warn) ariaDescribedBy = normalizedProps.warnId;
|
|
90
|
+
else ariaDescribedBy = helperText ? datePickerInputHelperId : void 0;
|
|
87
91
|
const inputProps = {
|
|
88
92
|
...rest,
|
|
89
93
|
...datePickerInputProps,
|
|
90
94
|
className: inputClasses,
|
|
91
95
|
disabled: normalizedProps.disabled,
|
|
92
96
|
ref,
|
|
93
|
-
["aria-describedby"]:
|
|
97
|
+
["aria-describedby"]: ariaDescribedBy
|
|
94
98
|
};
|
|
95
|
-
if (normalizedProps.invalid)
|
|
99
|
+
if (normalizedProps.invalid) {
|
|
100
|
+
inputProps["data-invalid"] = true;
|
|
101
|
+
inputProps["aria-invalid"] = true;
|
|
102
|
+
}
|
|
96
103
|
const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ...inputProps });
|
|
97
104
|
const candidate = slug ?? decorator;
|
|
98
105
|
const normalizedDecorator = require_utils.isComponentElement(candidate, require_index.AILabel) ? (0, react.cloneElement)(candidate, { size: "mini" }) : candidate;
|
|
@@ -152,7 +152,7 @@ export type DropdownTranslationKey = ListBoxMenuIconTranslationKey;
|
|
|
152
152
|
interface DropdownComponent {
|
|
153
153
|
<ItemType>(props: DropdownProps<ItemType> & {
|
|
154
154
|
ref?: Ref<HTMLButtonElement>;
|
|
155
|
-
}): React.ReactElement
|
|
155
|
+
}): React.ReactElement | null;
|
|
156
156
|
}
|
|
157
157
|
declare const _default: DropdownComponent;
|
|
158
158
|
export default _default;
|
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
|
|
8
8
|
const require_runtime = require("../../_virtual/_rolldown/runtime.js");
|
|
9
9
|
const require_usePrefix = require("../../internal/usePrefix.js");
|
|
10
|
+
const require_utils = require("../../internal/utils.js");
|
|
10
11
|
const require_index = require("../FluidTextInput/index.js");
|
|
12
|
+
const require_index$1 = require("../FluidTimePickerSelect/index.js");
|
|
11
13
|
let classnames = require("classnames");
|
|
12
14
|
classnames = require_runtime.__toESM(classnames);
|
|
13
15
|
let react = require("react");
|
|
@@ -18,7 +20,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
18
20
|
let _carbon_icons_react = require("@carbon/icons-react");
|
|
19
21
|
//#region src/components/FluidTimePicker/FluidTimePicker.tsx
|
|
20
22
|
/**
|
|
21
|
-
* Copyright IBM Corp. 2022
|
|
23
|
+
* Copyright IBM Corp. 2022, 2026
|
|
22
24
|
*
|
|
23
25
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
24
26
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -38,8 +40,8 @@ const FluidTimePicker = react.default.forwardRef(({ className, children, disable
|
|
|
38
40
|
};
|
|
39
41
|
const error = invalid || warn;
|
|
40
42
|
const childrenWithProps = () => {
|
|
41
|
-
if (disabled) return react.default.Children.toArray(children).map((child) =>
|
|
42
|
-
if (readOnly) return react.default.Children.toArray(children).map((child) =>
|
|
43
|
+
if (disabled) return react.default.Children.toArray(children).map((child) => require_utils.isComponentElement(child, require_index$1.default) ? (0, react.cloneElement)(child, { disabled: true }) : child);
|
|
44
|
+
if (readOnly) return react.default.Children.toArray(children).map((child) => require_utils.isComponentElement(child, require_index$1.default) ? (0, react.cloneElement)(child, { readOnly: true }) : child);
|
|
43
45
|
return children;
|
|
44
46
|
};
|
|
45
47
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
@@ -36,6 +36,10 @@ export interface FluidTimePickerSelectProps {
|
|
|
36
36
|
* the underlying `<input>` changes
|
|
37
37
|
*/
|
|
38
38
|
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
39
|
+
/**
|
|
40
|
+
* Whether the component is read-only.
|
|
41
|
+
*/
|
|
42
|
+
readOnly?: boolean;
|
|
39
43
|
}
|
|
40
44
|
declare const FluidTimePickerSelect: React.ForwardRefExoticComponent<FluidTimePickerSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
41
45
|
export default FluidTimePickerSelect;
|
|
@@ -34,7 +34,8 @@ FluidTimePickerSelect.propTypes = {
|
|
|
34
34
|
disabled: prop_types.default.bool,
|
|
35
35
|
id: prop_types.default.string.isRequired,
|
|
36
36
|
labelText: prop_types.default.node,
|
|
37
|
-
onChange: prop_types.default.func
|
|
37
|
+
onChange: prop_types.default.func,
|
|
38
|
+
readOnly: prop_types.default.bool
|
|
38
39
|
};
|
|
39
40
|
//#endregion
|
|
40
41
|
exports.default = FluidTimePickerSelect;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2026
|
|
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
|
+
//#region src/components/FluidTimePickerSelect/index.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Copyright IBM Corp. 2022
|
|
11
|
+
*
|
|
12
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
13
|
+
* LICENSE file in the root directory of this source tree.
|
|
14
|
+
*/
|
|
15
|
+
var FluidTimePickerSelect_default = require("./FluidTimePickerSelect.js").default;
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.default = FluidTimePickerSelect_default;
|
|
@@ -22,7 +22,7 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
22
22
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
24
|
*/
|
|
25
|
-
const CSSGrid = react.default.forwardRef(({ align, as, children, className: customClassName, condensed = false, fullWidth = false, narrow = false, ...rest }, ref) => {
|
|
25
|
+
const CSSGrid = react.default.forwardRef(({ align, as, children, className: customClassName, condensed = false, fullWidth = false, narrow = false, withRowGap, ...rest }, ref) => {
|
|
26
26
|
const prefix = require_usePrefix.usePrefix();
|
|
27
27
|
const { subgrid } = require_GridContext.useGridSettings();
|
|
28
28
|
let mode = "wide";
|
|
@@ -36,6 +36,7 @@ const CSSGrid = react.default.forwardRef(({ align, as, children, className: cust
|
|
|
36
36
|
as,
|
|
37
37
|
className: customClassName,
|
|
38
38
|
mode,
|
|
39
|
+
withRowGap,
|
|
39
40
|
...rest,
|
|
40
41
|
children
|
|
41
42
|
})
|
|
@@ -46,7 +47,8 @@ const CSSGrid = react.default.forwardRef(({ align, as, children, className: cust
|
|
|
46
47
|
[`${prefix}--css-grid--narrow`]: mode === "narrow",
|
|
47
48
|
[`${prefix}--css-grid--full-width`]: fullWidth,
|
|
48
49
|
[`${prefix}--css-grid--start`]: align === "start",
|
|
49
|
-
[`${prefix}--css-grid--end`]: align === "end"
|
|
50
|
+
[`${prefix}--css-grid--end`]: align === "end",
|
|
51
|
+
[`${prefix}--css-grid--with-row-gap`]: withRowGap
|
|
50
52
|
});
|
|
51
53
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_GridContext.GridSettings, {
|
|
52
54
|
mode: "css-grid",
|
|
@@ -70,15 +72,17 @@ CSSGrid.propTypes = {
|
|
|
70
72
|
className: prop_types.default.string,
|
|
71
73
|
condensed: prop_types.default.bool,
|
|
72
74
|
fullWidth: prop_types.default.bool,
|
|
73
|
-
narrow: prop_types.default.bool
|
|
75
|
+
narrow: prop_types.default.bool,
|
|
76
|
+
withRowGap: prop_types.default.bool
|
|
74
77
|
};
|
|
75
|
-
const Subgrid = react.default.forwardRef(({ as, className: customClassName, children, mode, ...rest }, ref) => {
|
|
78
|
+
const Subgrid = react.default.forwardRef(({ as, className: customClassName, children, mode, withRowGap, ...rest }, ref) => {
|
|
76
79
|
const prefix = require_usePrefix.usePrefix();
|
|
77
80
|
const className = (0, classnames.default)(customClassName, {
|
|
78
81
|
[`${prefix}--subgrid`]: true,
|
|
79
82
|
[`${prefix}--subgrid--condensed`]: mode === "condensed",
|
|
80
83
|
[`${prefix}--subgrid--narrow`]: mode === "narrow",
|
|
81
|
-
[`${prefix}--subgrid--wide`]: mode === "wide"
|
|
84
|
+
[`${prefix}--subgrid--wide`]: mode === "wide",
|
|
85
|
+
[`${prefix}--subgrid--with-row-gap`]: withRowGap
|
|
82
86
|
});
|
|
83
87
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(as || "div", {
|
|
84
88
|
...rest,
|
|
@@ -95,7 +99,8 @@ Subgrid.propTypes = {
|
|
|
95
99
|
"wide",
|
|
96
100
|
"narrow",
|
|
97
101
|
"condensed"
|
|
98
|
-
])
|
|
102
|
+
]),
|
|
103
|
+
withRowGap: prop_types.default.bool
|
|
99
104
|
};
|
|
100
105
|
const CSSGridComponent = CSSGrid;
|
|
101
106
|
//#endregion
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { type ReactElement } from 'react';
|
|
8
8
|
import { PolymorphicComponentPropWithRef } from '../../internal/PolymorphicProps';
|
|
9
9
|
type ColumnSpanPercent = '25%' | '50%' | '75%' | '100%';
|
|
10
10
|
type ColumnSpanSimple = boolean | number | ColumnSpanPercent;
|
|
@@ -67,7 +67,7 @@ export interface ColumnBaseProps {
|
|
|
67
67
|
}
|
|
68
68
|
export type ColumnProps<T extends React.ElementType> = PolymorphicComponentPropWithRef<T, ColumnBaseProps>;
|
|
69
69
|
export interface ColumnComponent {
|
|
70
|
-
<T extends React.ElementType>(props: ColumnProps<T>, context?: any):
|
|
70
|
+
<T extends React.ElementType>(props: ColumnProps<T>, context?: any): ReactElement | null;
|
|
71
71
|
}
|
|
72
72
|
declare const _default: ColumnComponent;
|
|
73
73
|
export default _default;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { type ReactElement } from 'react';
|
|
8
8
|
import { PolymorphicProps } from '../../types/common';
|
|
9
9
|
interface ColumnHangBaseProps {
|
|
10
10
|
/**
|
|
@@ -18,7 +18,7 @@ interface ColumnHangBaseProps {
|
|
|
18
18
|
}
|
|
19
19
|
export type ColumnHangProps<T extends React.ElementType> = PolymorphicProps<T, ColumnHangBaseProps>;
|
|
20
20
|
export interface ColumnHangComponent {
|
|
21
|
-
<T extends React.ElementType>(props: ColumnHangProps<T>, context?: any):
|
|
21
|
+
<T extends React.ElementType>(props: ColumnHangProps<T>, context?: any): ReactElement | null;
|
|
22
22
|
}
|
|
23
23
|
declare const ColumnHangComponent: ColumnHangComponent;
|
|
24
24
|
export { ColumnHangComponent as ColumnHang };
|
|
@@ -16,7 +16,7 @@ prop_types = require_runtime.__toESM(prop_types);
|
|
|
16
16
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
17
17
|
//#region src/components/Grid/ColumnHang.tsx
|
|
18
18
|
/**
|
|
19
|
-
* Copyright IBM Corp. 2016,
|
|
19
|
+
* Copyright IBM Corp. 2016, 2026
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -22,13 +22,14 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
22
22
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
23
23
|
* LICENSE file in the root directory of this source tree.
|
|
24
24
|
*/
|
|
25
|
-
const FlexGrid = react.default.forwardRef(({ as, condensed = false, narrow = false, fullWidth = false, className: containerClassName, children, ...rest }, ref) => {
|
|
25
|
+
const FlexGrid = react.default.forwardRef(({ as, condensed = false, narrow = false, fullWidth = false, withRowGap = false, className: containerClassName, children, ...rest }, ref) => {
|
|
26
26
|
const prefix = require_usePrefix.usePrefix();
|
|
27
27
|
const className = (0, classnames.default)(containerClassName, {
|
|
28
28
|
[`${prefix}--grid`]: true,
|
|
29
29
|
[`${prefix}--grid--condensed`]: condensed,
|
|
30
30
|
[`${prefix}--grid--narrow`]: narrow,
|
|
31
|
-
[`${prefix}--grid--full-width`]: fullWidth
|
|
31
|
+
[`${prefix}--grid--full-width`]: fullWidth,
|
|
32
|
+
[`${prefix}--grid--with-row-gap`]: withRowGap
|
|
32
33
|
});
|
|
33
34
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_GridContext.GridSettings, {
|
|
34
35
|
mode: "flexbox",
|
|
@@ -47,7 +48,8 @@ FlexGrid.propTypes = {
|
|
|
47
48
|
className: prop_types.default.string,
|
|
48
49
|
condensed: prop_types.default.bool,
|
|
49
50
|
fullWidth: prop_types.default.bool,
|
|
50
|
-
narrow: prop_types.default.bool
|
|
51
|
+
narrow: prop_types.default.bool,
|
|
52
|
+
withRowGap: prop_types.default.bool
|
|
51
53
|
};
|
|
52
54
|
const FlexGridComponent = FlexGrid;
|
|
53
55
|
//#endregion
|
|
@@ -36,7 +36,8 @@ Grid.propTypes = {
|
|
|
36
36
|
className: prop_types.default.string,
|
|
37
37
|
condensed: prop_types.default.bool,
|
|
38
38
|
fullWidth: prop_types.default.bool,
|
|
39
|
-
narrow: prop_types.default.bool
|
|
39
|
+
narrow: prop_types.default.bool,
|
|
40
|
+
withRowGap: prop_types.default.bool
|
|
40
41
|
};
|
|
41
42
|
const GridAsGridComponent = Grid;
|
|
42
43
|
//#endregion
|
|
@@ -33,6 +33,11 @@ export interface GridBaseProps {
|
|
|
33
33
|
* typographic alignment with and without containers.
|
|
34
34
|
*/
|
|
35
35
|
narrow?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Add a row gap to the grid that matches the current gutter size.
|
|
38
|
+
* This is useful when you want consistent vertical spacing between rows.
|
|
39
|
+
*/
|
|
40
|
+
withRowGap?: boolean;
|
|
36
41
|
}
|
|
37
42
|
export type GridProps<T extends React.ElementType> = PolymorphicComponentPropWithRef<T, GridBaseProps>;
|
|
38
43
|
export interface GridComponent {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2026
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { type ReactElement } from 'react';
|
|
8
8
|
import { PolymorphicProps } from '../../types/common';
|
|
9
9
|
export interface RowBaseProps {
|
|
10
10
|
/**
|
|
@@ -28,7 +28,7 @@ export interface RowBaseProps {
|
|
|
28
28
|
}
|
|
29
29
|
export type RowProps<T extends React.ElementType> = PolymorphicProps<T, RowBaseProps>;
|
|
30
30
|
export interface RowComponent {
|
|
31
|
-
<T extends React.ElementType>(props: RowProps<T>, context?: any):
|
|
31
|
+
<T extends React.ElementType>(props: RowProps<T>, context?: any): ReactElement | null;
|
|
32
32
|
}
|
|
33
33
|
declare const _default: RowComponent;
|
|
34
34
|
export default _default;
|
|
@@ -16,7 +16,7 @@ prop_types = require_runtime.__toESM(prop_types);
|
|
|
16
16
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
17
17
|
//#region src/components/Grid/Row.tsx
|
|
18
18
|
/**
|
|
19
|
-
* Copyright IBM Corp. 2016,
|
|
19
|
+
* Copyright IBM Corp. 2016, 2026
|
|
20
20
|
*
|
|
21
21
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -112,7 +112,7 @@ const Menu = (0, react.forwardRef)(function Menu({ backgroundToken = "layer", bo
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
function handleBlur(e) {
|
|
115
|
-
if (open && onClose && isRoot &&
|
|
115
|
+
if (open && onClose && isRoot && !menu.current?.contains(e.relatedTarget)) handleClose();
|
|
116
116
|
}
|
|
117
117
|
function fitValue(range, axis) {
|
|
118
118
|
if (!menu.current) return;
|
|
@@ -88,6 +88,9 @@ const MenuItem = (0, react.forwardRef)(function MenuItem({ children, className,
|
|
|
88
88
|
}
|
|
89
89
|
const pendingKeyboardClick = (0, react.useRef)(false);
|
|
90
90
|
const keyboardClickEvent = (e) => require_match.match(e, require_keys.Enter) || require_match.match(e, require_keys.Space);
|
|
91
|
+
function handleMouseDown(e) {
|
|
92
|
+
if (isDisabled) e.preventDefault();
|
|
93
|
+
}
|
|
91
94
|
function handleKeyDown(e) {
|
|
92
95
|
if (hasChildren && require_match.match(e, require_keys.ArrowRight)) {
|
|
93
96
|
openSubmenu();
|
|
@@ -142,6 +145,7 @@ const MenuItem = (0, react.forwardRef)(function MenuItem({ children, className,
|
|
|
142
145
|
"aria-disabled": isDisabled ?? void 0,
|
|
143
146
|
"aria-haspopup": hasChildren ?? void 0,
|
|
144
147
|
"aria-expanded": hasChildren ? submenuOpen : void 0,
|
|
148
|
+
onMouseDown: handleMouseDown,
|
|
145
149
|
onClick: handleClick,
|
|
146
150
|
onKeyDown: handleKeyDown,
|
|
147
151
|
onKeyUp: handleKeyUp,
|
|
@@ -140,6 +140,9 @@ const ModalDialog = react.default.forwardRef(function ModalDialog({ "aria-label"
|
|
|
140
140
|
}
|
|
141
141
|
const modalContent = document.querySelector(`.${prefix}--modal-content`);
|
|
142
142
|
if (!modalContent || !modalContent.classList.contains(`${prefix}--modal-scroll-content`) || !currentActiveNode || !modalContent.contains(currentActiveNode)) return;
|
|
143
|
+
const modalRect = modalContent.getBoundingClientRect();
|
|
144
|
+
const elementRect = currentActiveNode.getBoundingClientRect();
|
|
145
|
+
if (elementRect.top >= modalRect.top && elementRect.bottom <= modalRect.bottom) return;
|
|
143
146
|
currentActiveNode.scrollIntoView({ block: "center" });
|
|
144
147
|
}
|
|
145
148
|
const onSecondaryButtonClick = onSecondarySubmit ? onSecondarySubmit : onRequestClose;
|
|
@@ -195,7 +195,7 @@ export interface FilterableMultiSelectProps<ItemType> extends MultiSelectSorting
|
|
|
195
195
|
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
196
196
|
}
|
|
197
197
|
export declare const FilterableMultiSelect: {
|
|
198
|
-
<ItemType>(props: FilterableMultiSelectProps<ItemType>): ReactElement
|
|
198
|
+
<ItemType>(props: FilterableMultiSelectProps<ItemType>): ReactElement;
|
|
199
199
|
propTypes?: any;
|
|
200
200
|
contextTypes?: any;
|
|
201
201
|
defaultProps?: any;
|
|
@@ -14,6 +14,7 @@ const require_useId = require("../../internal/useId.js");
|
|
|
14
14
|
const require_deprecate = require("../../prop-types/deprecate.js");
|
|
15
15
|
const require_defaultItemToString = require("../../internal/defaultItemToString.js");
|
|
16
16
|
const require_utils = require("../../internal/utils.js");
|
|
17
|
+
const require_hasHelperText = require("../../internal/hasHelperText.js");
|
|
17
18
|
const require_useNormalizedInputProps = require("../../internal/useNormalizedInputProps.js");
|
|
18
19
|
const require_index = require("../AILabel/index.js");
|
|
19
20
|
const require_index$1 = require("../Checkbox/index.js");
|
|
@@ -181,7 +182,7 @@ const FilterableMultiSelect = (0, react.forwardRef)(function FilterableMultiSele
|
|
|
181
182
|
[`${prefix}--list-box__wrapper--decorator`]: decorator,
|
|
182
183
|
[`${prefix}--autoalign`]: autoAlign
|
|
183
184
|
});
|
|
184
|
-
const hasHelper =
|
|
185
|
+
const hasHelper = require_hasHelperText.hasHelperText(helperText);
|
|
185
186
|
const helperId = !hasHelper ? void 0 : `filterablemultiselect-helper-text-${filterableMultiSelectInstanceId}`;
|
|
186
187
|
const labelId = `${id}-label`;
|
|
187
188
|
const titleClasses = (0, classnames.default)({
|
|
@@ -400,7 +401,7 @@ const FilterableMultiSelect = (0, react.forwardRef)(function FilterableMultiSele
|
|
|
400
401
|
});
|
|
401
402
|
const inputProp = getInputProps(getDropdownProps({
|
|
402
403
|
"aria-controls": isOpen ? menuId : void 0,
|
|
403
|
-
"aria-describedby":
|
|
404
|
+
"aria-describedby": hasHelper && showHelperText ? helperId : void 0,
|
|
404
405
|
"aria-haspopup": "listbox",
|
|
405
406
|
"aria-labelledby": void 0,
|
|
406
407
|
disabled,
|
|
@@ -178,6 +178,6 @@ type MultiSelectComponentProps<ItemType> = React.PropsWithChildren<MultiSelectPr
|
|
|
178
178
|
interface MultiSelectComponent {
|
|
179
179
|
propTypes: Record<string, any>;
|
|
180
180
|
displayName: string;
|
|
181
|
-
<ItemType>(props: MultiSelectComponentProps<ItemType>): React.ReactElement
|
|
181
|
+
<ItemType>(props: MultiSelectComponentProps<ItemType>): React.ReactElement | null;
|
|
182
182
|
}
|
|
183
183
|
export {};
|
|
@@ -13,9 +13,11 @@ const require_setupGetInstanceId = require("../../tools/setupGetInstanceId.js");
|
|
|
13
13
|
const require_noopFn = require("../../internal/noopFn.js");
|
|
14
14
|
const require_deprecate = require("../../prop-types/deprecate.js");
|
|
15
15
|
const require_deprecateValuesWithin = require("../../prop-types/deprecateValuesWithin.js");
|
|
16
|
+
const require_utils = require("../../internal/utils.js");
|
|
16
17
|
const require_mapPopoverAlign = require("../../tools/mapPopoverAlign.js");
|
|
17
18
|
const require_index = require("../IconButton/index.js");
|
|
18
19
|
const require_mergeRefs = require("../../tools/mergeRefs.js");
|
|
20
|
+
const require_OverflowMenuItem = require("../OverflowMenuItem/OverflowMenuItem.js");
|
|
19
21
|
const require_FloatingMenu = require("../../internal/FloatingMenu.js");
|
|
20
22
|
const require_useOutsideClick = require("../../internal/useOutsideClick.js");
|
|
21
23
|
let classnames = require("classnames");
|
|
@@ -227,17 +229,14 @@ const OverflowMenu = (0, react.forwardRef)(({ align, ["aria-label"]: ariaLabel =
|
|
|
227
229
|
});
|
|
228
230
|
const overflowMenuIconClasses = (0, classnames.default)(`${prefix}--overflow-menu__icon`, iconClass);
|
|
229
231
|
const childrenWithProps = react.Children.toArray(children).map((child, index) => {
|
|
230
|
-
if ((0, react.
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
index
|
|
239
|
-
});
|
|
240
|
-
}
|
|
232
|
+
if (require_utils.isComponentElement(child, require_OverflowMenuItem.default)) return (0, react.cloneElement)(child, {
|
|
233
|
+
closeMenu: child.props.closeMenu || closeMenuAndFocus,
|
|
234
|
+
handleOverflowMenuItemFocus,
|
|
235
|
+
ref: (el) => {
|
|
236
|
+
menuItemRefs.current[index] = el;
|
|
237
|
+
},
|
|
238
|
+
index
|
|
239
|
+
});
|
|
241
240
|
return null;
|
|
242
241
|
});
|
|
243
242
|
const wrappedMenuBody = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FloatingMenu.FloatingMenu, {
|
|
@@ -75,6 +75,7 @@ const Pagination = react.default.forwardRef(({ backwardText = "Previous page", c
|
|
|
75
75
|
const className = (0, classnames.default)({
|
|
76
76
|
[`${prefix}--pagination`]: true,
|
|
77
77
|
[`${prefix}--pagination--${size}`]: size,
|
|
78
|
+
[`${prefix}--layout--size-${size}`]: size,
|
|
78
79
|
[customClassName]: !!customClassName
|
|
79
80
|
});
|
|
80
81
|
const totalPages = totalItems ? Math.max(Math.ceil(totalItems / pageSize), 1) : 1;
|
|
@@ -292,6 +293,7 @@ Pagination.propTypes = {
|
|
|
292
293
|
pageText: prop_types.default.func,
|
|
293
294
|
pagesUnknown: prop_types.default.bool,
|
|
294
295
|
size: prop_types.default.oneOf([
|
|
296
|
+
"xs",
|
|
295
297
|
"sm",
|
|
296
298
|
"md",
|
|
297
299
|
"lg"
|
|
@@ -41,6 +41,18 @@ const Popover = react.default.forwardRef(function PopoverRenderFunction({ isTabT
|
|
|
41
41
|
const popover = (0, react.useRef)(null);
|
|
42
42
|
const enableFloatingStyles = require_index.useFeatureFlag("enable-v12-dynamic-floating-styles") || autoAlign;
|
|
43
43
|
const lastClickWasInsidePopoverContent = (0, react.useRef)(false);
|
|
44
|
+
const isTargetInDatePickerInsidePopover = (target) => {
|
|
45
|
+
if (!popover.current) return false;
|
|
46
|
+
const calendar = target instanceof Element && target.closest(".flatpickr-calendar");
|
|
47
|
+
if (!calendar) return false;
|
|
48
|
+
const inputs = popover.current.querySelectorAll("input");
|
|
49
|
+
for (const input of inputs) {
|
|
50
|
+
if (!("_flatpickr" in input)) continue;
|
|
51
|
+
const fp = input._flatpickr;
|
|
52
|
+
if (fp && typeof fp === "object" && "calendarContainer" in fp && fp.calendarContainer === calendar) return true;
|
|
53
|
+
}
|
|
54
|
+
return false;
|
|
55
|
+
};
|
|
44
56
|
let align = require_mapPopoverAlign.mapPopoverAlign(initialAlign);
|
|
45
57
|
require_useEvent.useEvent(popover, "mousedown", (event) => {
|
|
46
58
|
const target = event.target;
|
|
@@ -58,13 +70,14 @@ const Popover = react.default.forwardRef(function PopoverRenderFunction({ isTabT
|
|
|
58
70
|
}
|
|
59
71
|
onRequestClose?.();
|
|
60
72
|
} else if (relatedTarget && !popover.current?.contains(relatedTarget)) {
|
|
73
|
+
if (isTargetInDatePickerInsidePopover(relatedTarget)) return;
|
|
61
74
|
const isOutsideFloating = enableFloatingStyles && refs.floating.current ? !refs.floating.current.contains(relatedTarget) : true;
|
|
62
75
|
const isFocusableWrapper = relatedTarget && popover.current && relatedTarget.contains(popover.current);
|
|
63
76
|
if (isOutsideFloating && !isFocusableWrapper) onRequestClose?.();
|
|
64
77
|
}
|
|
65
78
|
});
|
|
66
79
|
require_useEvent.useWindowEvent("click", ({ target }) => {
|
|
67
|
-
if (open && target instanceof Node && !popover.current?.contains(target)) onRequestClose?.();
|
|
80
|
+
if (open && target instanceof Node && !popover.current?.contains(target) && !isTargetInDatePickerInsidePopover(target)) onRequestClose?.();
|
|
68
81
|
});
|
|
69
82
|
const popoverDimensions = (0, react.useRef)({
|
|
70
83
|
offset: 10,
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import React, { type ReactNode } from 'react';
|
|
8
|
-
import type
|
|
8
|
+
import { type RadioButtonProps } from '../RadioButton';
|
|
9
9
|
export declare const RadioButtonGroupContext: React.Context<null>;
|
|
10
10
|
type ExcludedAttributes = 'onChange';
|
|
11
11
|
export interface RadioButtonGroupProps extends Omit<React.InputHTMLAttributes<HTMLFieldSetElement>, ExcludedAttributes> {
|