@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
|
@@ -38,12 +38,12 @@ export interface AccordionItemProps {
|
|
|
38
38
|
* removed in the next major release of Carbon. Use the
|
|
39
39
|
* `renderToggle` prop instead.
|
|
40
40
|
*/
|
|
41
|
-
renderExpando?: (props: PropsWithChildren<AccordionToggleProps>) => ReactElement
|
|
41
|
+
renderExpando?: (props: PropsWithChildren<AccordionToggleProps>) => ReactElement;
|
|
42
42
|
/**
|
|
43
43
|
* The callback function to render the expand button.
|
|
44
44
|
* Can be a React component class.
|
|
45
45
|
*/
|
|
46
|
-
renderToggle?: (props: PropsWithChildren<AccordionToggleProps>) => ReactElement
|
|
46
|
+
renderToggle?: (props: PropsWithChildren<AccordionToggleProps>) => ReactElement;
|
|
47
47
|
/**
|
|
48
48
|
* The accordion title.
|
|
49
49
|
*/
|
|
@@ -11,6 +11,7 @@ import { useId } from "../../internal/useId.js";
|
|
|
11
11
|
import { noopFn } from "../../internal/noopFn.js";
|
|
12
12
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
13
13
|
import { isComponentElement } from "../../internal/utils.js";
|
|
14
|
+
import { hasHelperText } from "../../internal/hasHelperText.js";
|
|
14
15
|
import { useNormalizedInputProps } from "../../internal/useNormalizedInputProps.js";
|
|
15
16
|
import { AILabel } from "../AILabel/index.js";
|
|
16
17
|
import classNames from "classnames";
|
|
@@ -39,7 +40,7 @@ const Checkbox$1 = React.forwardRef(({ className, decorator, helperText, id, lab
|
|
|
39
40
|
const showWarning = normalizedProps.warn;
|
|
40
41
|
const showHelper = !normalizedProps.invalid && !normalizedProps.warn;
|
|
41
42
|
const checkboxGroupInstanceId = useId();
|
|
42
|
-
const hasHelper =
|
|
43
|
+
const hasHelper = hasHelperText(helperText);
|
|
43
44
|
const helperId = !hasHelper ? void 0 : `checkbox-helper-text-${checkboxGroupInstanceId}`;
|
|
44
45
|
const helper = hasHelper && /* @__PURE__ */ jsx("div", {
|
|
45
46
|
id: helperId,
|
|
@@ -9,6 +9,7 @@ import { usePrefix } from "../../internal/usePrefix.js";
|
|
|
9
9
|
import { useId } from "../../internal/useId.js";
|
|
10
10
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
11
11
|
import { isComponentElement } from "../../internal/utils.js";
|
|
12
|
+
import { hasHelperText } from "../../internal/hasHelperText.js";
|
|
12
13
|
import { useNormalizedInputProps } from "../../internal/useNormalizedInputProps.js";
|
|
13
14
|
import { AILabel } from "../AILabel/index.js";
|
|
14
15
|
import Checkbox$1 from "../Checkbox/Checkbox.js";
|
|
@@ -38,7 +39,7 @@ const CheckboxGroup = ({ children, className, decorator, helperText, invalid, in
|
|
|
38
39
|
});
|
|
39
40
|
const showWarning = normalizedProps.warn;
|
|
40
41
|
const showHelper = !normalizedProps.invalid && !normalizedProps.warn;
|
|
41
|
-
const hasHelper =
|
|
42
|
+
const hasHelper = hasHelperText(helperText);
|
|
42
43
|
const helperId = !hasHelper ? void 0 : `checkbox-group-helper-text-${checkboxGroupInstanceId}`;
|
|
43
44
|
const helper = hasHelper && /* @__PURE__ */ jsx("div", {
|
|
44
45
|
id: helperId,
|
|
@@ -197,7 +197,7 @@ export interface ComboBoxProps<ItemType> extends Omit<InputHTMLAttributes<HTMLIn
|
|
|
197
197
|
}
|
|
198
198
|
type ComboboxComponentProps<ItemType> = PropsWithChildren<ComboBoxProps<ItemType>> & RefAttributes<HTMLInputElement>;
|
|
199
199
|
export interface ComboBoxComponent {
|
|
200
|
-
<ItemType>(props: ComboboxComponentProps<ItemType>): ReactElement
|
|
200
|
+
<ItemType>(props: ComboboxComponentProps<ItemType>): ReactElement | null;
|
|
201
201
|
}
|
|
202
202
|
declare const _default: ComboBoxComponent;
|
|
203
203
|
export default _default;
|
|
@@ -351,7 +351,7 @@ const ComboBox = forwardRef((props, ref) => {
|
|
|
351
351
|
selectedItem: newSelectedItem
|
|
352
352
|
});
|
|
353
353
|
if (isManualClearingRef.current) return;
|
|
354
|
-
if ((type === ItemClick || type === FunctionSelectItem || type === InputKeyDownEnter) && typeof newSelectedItem !== "undefined" && !isEqual(
|
|
354
|
+
if ((type === ItemClick || type === FunctionSelectItem || type === InputKeyDownEnter || !allowCustomValue && type === InputBlur) && typeof newSelectedItem !== "undefined" && !isEqual(currentSelectedItem, newSelectedItem)) {
|
|
355
355
|
if (items.some((item) => isEqual(item, newSelectedItem))) committedCustomValueRef.current = "";
|
|
356
356
|
onChange({ selectedItem: newSelectedItem });
|
|
357
357
|
}
|
|
@@ -11,7 +11,7 @@ export interface ContentSwitcherProps extends Omit<HTMLAttributes<HTMLElement>,
|
|
|
11
11
|
/**
|
|
12
12
|
* Pass in Switch components to be rendered in the ContentSwitcher
|
|
13
13
|
*/
|
|
14
|
-
children?: ReactElement
|
|
14
|
+
children?: ReactElement | ReactElement[];
|
|
15
15
|
/**
|
|
16
16
|
* Specify an optional className to be added to the container node
|
|
17
17
|
*/
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
|
|
8
8
|
import { PrefixContext } from "../../internal/usePrefix.js";
|
|
9
9
|
import { ArrowLeft, ArrowRight, Enter, Space } from "../../internal/keyboard/keys.js";
|
|
10
|
-
import {
|
|
10
|
+
import { match } from "../../internal/keyboard/match.js";
|
|
11
11
|
import { getNextIndex } from "../../internal/keyboard/navigation.js";
|
|
12
12
|
import { deprecate } from "../../prop-types/deprecate.js";
|
|
13
13
|
import { isComponentElement } from "../../internal/utils.js";
|
|
14
|
-
import { composeEventHandlers } from "../../tools/events.js";
|
|
15
14
|
import { LayoutConstraint } from "../Layout/index.js";
|
|
15
|
+
import Switch from "../Switch/Switch.js";
|
|
16
16
|
import IconSwitch from "../Switch/IconSwitch.js";
|
|
17
17
|
import classNames from "classnames";
|
|
18
|
-
import { Children, cloneElement,
|
|
18
|
+
import { Children, cloneElement, useContext, useEffect, useRef, useState } from "react";
|
|
19
19
|
import PropTypes from "prop-types";
|
|
20
20
|
import { jsx } from "react/jsx-runtime";
|
|
21
21
|
//#region src/components/ContentSwitcher/ContentSwitcher.tsx
|
|
@@ -44,25 +44,25 @@ const ContentSwitcher = ({ children, className, light, lowContrast, selectedInde
|
|
|
44
44
|
const ref = switchRefs.current[index];
|
|
45
45
|
if (ref) ref.focus();
|
|
46
46
|
};
|
|
47
|
-
const
|
|
47
|
+
const hasKey = (event) => typeof event === "object" && event !== null && "key" in event;
|
|
48
48
|
const handleChildChange = (event) => {
|
|
49
49
|
if (typeof event.index === "undefined") return;
|
|
50
50
|
const { index } = event;
|
|
51
|
-
if (
|
|
51
|
+
if (hasKey(event) && (match(event.key, ArrowRight) || match(event.key, ArrowLeft))) {
|
|
52
52
|
const nextIndex = getNextIndex(event.key, index, childrenArray.length);
|
|
53
53
|
if (typeof nextIndex !== "number") return;
|
|
54
54
|
focusSwitch(nextIndex);
|
|
55
55
|
if (selectionMode !== "manual") {
|
|
56
56
|
const child = childrenArray[nextIndex];
|
|
57
57
|
setSelectedIndex(nextIndex);
|
|
58
|
-
if (
|
|
58
|
+
if (isComponentElement(child, Switch) || isComponentElement(child, IconSwitch)) onChange({
|
|
59
59
|
...event,
|
|
60
60
|
index: nextIndex,
|
|
61
61
|
name: child.props.name,
|
|
62
62
|
text: child.props.text
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
} else if (selectedIndex !== index && (
|
|
65
|
+
} else if (selectedIndex !== index && (hasKey(event) ? match(event.key, Enter) || match(event.key, Space) : true)) {
|
|
66
66
|
setSelectedIndex(index);
|
|
67
67
|
focusSwitch(index);
|
|
68
68
|
onChange(event);
|
|
@@ -88,14 +88,23 @@ const ContentSwitcher = ({ children, className, light, lowContrast, selectedInde
|
|
|
88
88
|
className: classes,
|
|
89
89
|
role: "tablist",
|
|
90
90
|
onChange: void 0,
|
|
91
|
-
children:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
91
|
+
children: Children.map(children, (child, index) => {
|
|
92
|
+
if (!isComponentElement(child, Switch) && !isComponentElement(child, IconSwitch)) return child;
|
|
93
|
+
return cloneElement(child, {
|
|
94
|
+
index,
|
|
95
|
+
onClick: (event) => {
|
|
96
|
+
handleChildChange(event);
|
|
97
|
+
child.props.onClick?.(event);
|
|
98
|
+
},
|
|
99
|
+
onKeyDown: (event) => {
|
|
100
|
+
handleChildChange(event);
|
|
101
|
+
child.props.onKeyDown?.(event);
|
|
102
|
+
},
|
|
103
|
+
selected: index === selectedIndex,
|
|
104
|
+
ref: handleItemRef(index),
|
|
105
|
+
...isComponentElement(child, IconSwitch) ? { size } : {}
|
|
106
|
+
});
|
|
107
|
+
})
|
|
99
108
|
});
|
|
100
109
|
};
|
|
101
110
|
ContentSwitcher.displayName = "ContentSwitcher";
|
|
@@ -255,7 +255,7 @@ export declare const DataTable: {
|
|
|
255
255
|
tabIndex: PropTypes.Requireable<number>;
|
|
256
256
|
};
|
|
257
257
|
};
|
|
258
|
-
TableActionList: (props: import("react").HTMLAttributes<"div">) =>
|
|
258
|
+
TableActionList: (props: import("react").HTMLAttributes<"div">) => ReactElement;
|
|
259
259
|
TableBatchAction: {
|
|
260
260
|
({ renderIcon, iconDescription, ...props }: import("./TableBatchAction").TableBatchActionProps): import("react/jsx-runtime").JSX.Element;
|
|
261
261
|
propTypes: {
|
|
@@ -332,7 +332,7 @@ export declare const DataTable: {
|
|
|
332
332
|
colSpan: PropTypes.Validator<number>;
|
|
333
333
|
};
|
|
334
334
|
};
|
|
335
|
-
TableHead: (props: import("react").HTMLAttributes<"thead">) =>
|
|
335
|
+
TableHead: (props: import("react").HTMLAttributes<"thead">) => ReactElement;
|
|
336
336
|
TableHeader: import("react").ForwardRefExoticComponent<import("./TableHeader").TableHeaderProps & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
337
337
|
TableRow: import("react").ForwardRefExoticComponent<import("./TableRow").TableRowProps & import("react").RefAttributes<HTMLTableRowElement>>;
|
|
338
338
|
TableSelectAll: {
|
|
@@ -382,7 +382,7 @@ export declare const DataTable: {
|
|
|
382
382
|
};
|
|
383
383
|
};
|
|
384
384
|
TableToolbarAction: import("react").ForwardRefExoticComponent<import("./TableToolbarAction").TableToolbarActionProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
385
|
-
TableToolbarContent: (props: import("react").HTMLAttributes<"div">) =>
|
|
385
|
+
TableToolbarContent: (props: import("react").HTMLAttributes<"div">) => ReactElement;
|
|
386
386
|
TableToolbarSearch: {
|
|
387
387
|
({ className, searchContainerClass, onChange: onChangeProp, onClear, translateWithId: t, placeholder, labelText, expanded: expandedProp, defaultExpanded, defaultValue, disabled, onExpand, persistent, id, onBlur, onFocus, size, tabIndex, ...rest }: import("./TableToolbarSearch").TableToolbarSearchProps): import("react/jsx-runtime").JSX.Element;
|
|
388
388
|
propTypes: {
|
|
@@ -4,5 +4,5 @@
|
|
|
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
|
-
declare const TableActionList: (props: import("react").HTMLAttributes<"div">) =>
|
|
7
|
+
declare const TableActionList: (props: import("react").HTMLAttributes<"div">) => import("react").ReactElement;
|
|
8
8
|
export default TableActionList;
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { ThHTMLAttributes } from 'react';
|
|
8
8
|
export type TableHeadProps = ThHTMLAttributes<HTMLTableSectionElement>;
|
|
9
|
-
declare const TableHead: (props: import("react").HTMLAttributes<"thead">) =>
|
|
9
|
+
declare const TableHead: (props: import("react").HTMLAttributes<"thead">) => import("react").ReactElement;
|
|
10
10
|
export default TableHead;
|
|
@@ -1,11 +1,11 @@
|
|
|
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
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import { ReactNode } from 'react';
|
|
8
|
+
import { type ReactNode } from 'react';
|
|
9
9
|
export interface TableSlugRowProps {
|
|
10
10
|
/**
|
|
11
11
|
* The CSS class names of the cell that wraps the underlying input control
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
9
|
import { deprecateComponent } from "../../prop-types/deprecateComponent.js";
|
|
10
10
|
import classNames from "classnames";
|
|
11
|
-
import
|
|
11
|
+
import { cloneElement, isValidElement, useEffect } from "react";
|
|
12
12
|
import PropTypes from "prop-types";
|
|
13
13
|
import { jsx } from "react/jsx-runtime";
|
|
14
14
|
//#region src/components/DataTable/TableSlugRow.tsx
|
|
15
15
|
/**
|
|
16
|
-
* Copyright IBM Corp. 2016,
|
|
16
|
+
* Copyright IBM Corp. 2016, 2026
|
|
17
17
|
*
|
|
18
18
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -23,16 +23,13 @@ const TableSlugRow = ({ className, slug }) => {
|
|
|
23
23
|
deprecateComponent("TableSlugRow", "The `TableSlugRow` component has been deprecated and will be removed in the next major version. Use the TableDecoratorRow component instead.");
|
|
24
24
|
}, []);
|
|
25
25
|
const prefix = usePrefix();
|
|
26
|
-
const TableSlugRowClasses = classNames({
|
|
27
|
-
...className && { [className]: true },
|
|
28
|
-
[`${prefix}--table-column-slug`]: true,
|
|
29
|
-
[`${prefix}--table-column-slug--active`]: slug
|
|
30
|
-
});
|
|
31
|
-
let normalizedSlug;
|
|
32
|
-
if (slug) normalizedSlug = React.cloneElement(slug, { size: "mini" });
|
|
33
26
|
return /* @__PURE__ */ jsx("td", {
|
|
34
|
-
className:
|
|
35
|
-
|
|
27
|
+
className: classNames({
|
|
28
|
+
...className && { [className]: true },
|
|
29
|
+
[`${prefix}--table-column-slug`]: true,
|
|
30
|
+
[`${prefix}--table-column-slug--active`]: slug
|
|
31
|
+
}),
|
|
32
|
+
children: isValidElement(slug) ? cloneElement(slug, { size: "mini" }) : void 0
|
|
36
33
|
});
|
|
37
34
|
};
|
|
38
35
|
TableSlugRow.displayName = "TableSlugRow";
|
|
@@ -4,5 +4,5 @@
|
|
|
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
|
-
declare const TableToolbarContent: (props: import("react").HTMLAttributes<"div">) =>
|
|
7
|
+
declare const TableToolbarContent: (props: import("react").HTMLAttributes<"div">) => import("react").ReactElement;
|
|
8
8
|
export default TableToolbarContent;
|
|
@@ -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: {
|
|
@@ -39,6 +39,7 @@ function initializeWeekdayShorthand() {
|
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
41
|
const forEach = Array.prototype.forEach;
|
|
42
|
+
const defaultAriaDateFormat = "l, F j, Y";
|
|
42
43
|
/**
|
|
43
44
|
* @param {number} monthNumber The month number.
|
|
44
45
|
* @param {boolean} shorthand `true` to use shorthand month.
|
|
@@ -164,7 +165,6 @@ const DatePicker = forwardRef((props, ref) => {
|
|
|
164
165
|
const lastFocusedField = useRef(null);
|
|
165
166
|
const savedOnChange = useSavedCallback(onChange);
|
|
166
167
|
const savedOnOpen = useSavedCallback(onOpen);
|
|
167
|
-
const effectiveWarn = warn && !invalid;
|
|
168
168
|
const wrapperRef = useRef(null);
|
|
169
169
|
const datePickerClasses = classNames(`${prefix}--date-picker`, {
|
|
170
170
|
[`${prefix}--date-picker--short`]: short,
|
|
@@ -176,31 +176,35 @@ const DatePicker = forwardRef((props, ref) => {
|
|
|
176
176
|
});
|
|
177
177
|
const wrapperClasses = classNames(`${prefix}--form-item`, { [String(className)]: className });
|
|
178
178
|
const childrenWithProps = React.Children.toArray(children).map((child, index) => {
|
|
179
|
+
const childInvalid = child.props?.invalid;
|
|
180
|
+
const childWarn = child.props?.warn;
|
|
181
|
+
const mergedInvalid = invalid ?? childInvalid;
|
|
182
|
+
const mergedWarn = mergedInvalid ? false : warn ?? childWarn;
|
|
179
183
|
if (index === 0 && isComponentElement(child, DatePickerInput_default)) return React.cloneElement(child, {
|
|
180
184
|
datePickerType,
|
|
181
185
|
ref: startInputField,
|
|
182
186
|
readOnly,
|
|
183
|
-
invalid,
|
|
184
|
-
warn:
|
|
187
|
+
invalid: mergedInvalid,
|
|
188
|
+
warn: mergedWarn
|
|
185
189
|
});
|
|
186
190
|
if (index === 1 && isComponentElement(child, DatePickerInput_default)) return React.cloneElement(child, {
|
|
187
191
|
datePickerType,
|
|
188
192
|
ref: endInputField,
|
|
189
193
|
readOnly,
|
|
190
|
-
invalid,
|
|
191
|
-
warn:
|
|
194
|
+
invalid: mergedInvalid,
|
|
195
|
+
warn: mergedWarn
|
|
192
196
|
});
|
|
193
197
|
if (index === 0) return React.cloneElement(child, {
|
|
194
198
|
ref: startInputField,
|
|
195
199
|
readOnly,
|
|
196
|
-
invalid,
|
|
197
|
-
warn:
|
|
200
|
+
invalid: mergedInvalid,
|
|
201
|
+
warn: mergedWarn
|
|
198
202
|
});
|
|
199
203
|
if (index === 1) return React.cloneElement(child, {
|
|
200
204
|
ref: endInputField,
|
|
201
205
|
readOnly,
|
|
202
|
-
invalid,
|
|
203
|
-
warn:
|
|
206
|
+
invalid: mergedInvalid,
|
|
207
|
+
warn: mergedWarn
|
|
204
208
|
});
|
|
205
209
|
});
|
|
206
210
|
useEffect(() => {
|
|
@@ -255,6 +259,7 @@ const DatePicker = forwardRef((props, ref) => {
|
|
|
255
259
|
inline: inline ?? false,
|
|
256
260
|
onClose: onCalendarClose,
|
|
257
261
|
disableMobile: true,
|
|
262
|
+
ariaDateFormat: defaultAriaDateFormat,
|
|
258
263
|
defaultDate: value,
|
|
259
264
|
closeOnSelect,
|
|
260
265
|
mode: datePickerType,
|
|
@@ -339,7 +344,6 @@ const DatePicker = forwardRef((props, ref) => {
|
|
|
339
344
|
const { target } = event;
|
|
340
345
|
if (target === start) lastStartValue.current = start.value;
|
|
341
346
|
if (start.value !== "") return;
|
|
342
|
-
if (!calendar.selectedDates) return;
|
|
343
347
|
if (calendar.selectedDates.length === 0) return;
|
|
344
348
|
}
|
|
345
349
|
function handleKeyPress(event) {
|
|
@@ -421,9 +425,7 @@ const DatePicker = forwardRef((props, ref) => {
|
|
|
421
425
|
}, [value, startInputField]);
|
|
422
426
|
useEffect(() => {
|
|
423
427
|
if (calendarRef.current?.set) {
|
|
424
|
-
if (value
|
|
425
|
-
if (calendarRef.current.selectedDates.length > 0) calendarRef.current.clear();
|
|
426
|
-
} else calendarRef.current.setDate(value);
|
|
428
|
+
if (!isEmptyDateValue(value) && (!Array.isArray(value) || value.length > 0 && !value.every(isEmptyDateValue))) calendarRef.current.setDate(value);
|
|
427
429
|
updateClassNames(calendarRef.current, prefix);
|
|
428
430
|
} else if (!calendarRef.current && typeof value !== "undefined" && value !== null) startInputField.current.value = value;
|
|
429
431
|
}, [
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { ArrowDown,
|
|
8
|
+
import { ArrowDown, Enter } from "../../../internal/keyboard/keys.js";
|
|
9
9
|
import { match } from "../../../internal/keyboard/match.js";
|
|
10
10
|
//#region src/components/DatePicker/plugins/fixEventsPlugin.ts
|
|
11
11
|
const fixEventsPlugin = (config) => (fp) => {
|
|
@@ -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 (match(event,
|
|
56
|
-
else if (match(event, ArrowDown)) {
|
|
55
|
+
} else if (match(event, ArrowDown)) {
|
|
57
56
|
event.preventDefault();
|
|
58
57
|
fp.open();
|
|
59
58
|
} else if (!fp.config.allowInput) {
|
|
@@ -80,15 +80,22 @@ const DatePickerInput = forwardRef((props, ref) => {
|
|
|
80
80
|
[`${prefix}--date-picker--fluid--warn`]: isFluid && normalizedProps.warn
|
|
81
81
|
});
|
|
82
82
|
const datePickerInputHelperId = !helperText ? void 0 : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
|
|
83
|
+
let ariaDescribedBy;
|
|
84
|
+
if (normalizedProps.invalid) ariaDescribedBy = normalizedProps.invalidId;
|
|
85
|
+
else if (normalizedProps.warn) ariaDescribedBy = normalizedProps.warnId;
|
|
86
|
+
else ariaDescribedBy = helperText ? datePickerInputHelperId : void 0;
|
|
83
87
|
const inputProps = {
|
|
84
88
|
...rest,
|
|
85
89
|
...datePickerInputProps,
|
|
86
90
|
className: inputClasses,
|
|
87
91
|
disabled: normalizedProps.disabled,
|
|
88
92
|
ref,
|
|
89
|
-
["aria-describedby"]:
|
|
93
|
+
["aria-describedby"]: ariaDescribedBy
|
|
90
94
|
};
|
|
91
|
-
if (normalizedProps.invalid)
|
|
95
|
+
if (normalizedProps.invalid) {
|
|
96
|
+
inputProps["data-invalid"] = true;
|
|
97
|
+
inputProps["aria-invalid"] = true;
|
|
98
|
+
}
|
|
92
99
|
const input = /* @__PURE__ */ jsx("input", { ...inputProps });
|
|
93
100
|
const candidate = slug ?? decorator;
|
|
94
101
|
const normalizedDecorator = isComponentElement(candidate, AILabel) ? 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;
|
|
@@ -6,15 +6,17 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { usePrefix } from "../../internal/usePrefix.js";
|
|
9
|
+
import { isComponentElement } from "../../internal/utils.js";
|
|
9
10
|
import FluidTextInput_default from "../FluidTextInput/index.js";
|
|
11
|
+
import FluidTimePickerSelect_default from "../FluidTimePickerSelect/index.js";
|
|
10
12
|
import classNames from "classnames";
|
|
11
|
-
import React from "react";
|
|
13
|
+
import React, { cloneElement } from "react";
|
|
12
14
|
import PropTypes from "prop-types";
|
|
13
15
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
14
16
|
import { WarningAltFilled, WarningFilled } from "@carbon/icons-react";
|
|
15
17
|
//#region src/components/FluidTimePicker/FluidTimePicker.tsx
|
|
16
18
|
/**
|
|
17
|
-
* Copyright IBM Corp. 2022
|
|
19
|
+
* Copyright IBM Corp. 2022, 2026
|
|
18
20
|
*
|
|
19
21
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
20
22
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -34,8 +36,8 @@ const FluidTimePicker = React.forwardRef(({ className, children, disabled, inval
|
|
|
34
36
|
};
|
|
35
37
|
const error = invalid || warn;
|
|
36
38
|
const childrenWithProps = () => {
|
|
37
|
-
if (disabled) return React.Children.toArray(children).map((child) =>
|
|
38
|
-
if (readOnly) return React.Children.toArray(children).map((child) =>
|
|
39
|
+
if (disabled) return React.Children.toArray(children).map((child) => isComponentElement(child, FluidTimePickerSelect_default) ? cloneElement(child, { disabled: true }) : child);
|
|
40
|
+
if (readOnly) return React.Children.toArray(children).map((child) => isComponentElement(child, FluidTimePickerSelect_default) ? cloneElement(child, { readOnly: true }) : child);
|
|
39
41
|
return children;
|
|
40
42
|
};
|
|
41
43
|
return /* @__PURE__ */ 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;
|
|
@@ -31,7 +31,8 @@ FluidTimePickerSelect.propTypes = {
|
|
|
31
31
|
disabled: PropTypes.bool,
|
|
32
32
|
id: PropTypes.string.isRequired,
|
|
33
33
|
labelText: PropTypes.node,
|
|
34
|
-
onChange: PropTypes.func
|
|
34
|
+
onChange: PropTypes.func,
|
|
35
|
+
readOnly: PropTypes.bool
|
|
35
36
|
};
|
|
36
37
|
//#endregion
|
|
37
38
|
export { FluidTimePickerSelect as default };
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
import FluidTimePickerSelect from "./FluidTimePickerSelect.js";
|
|
9
|
+
//#region src/components/FluidTimePickerSelect/index.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Copyright IBM Corp. 2022
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*/
|
|
16
|
+
var FluidTimePickerSelect_default = FluidTimePickerSelect;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { FluidTimePickerSelect_default as default };
|
|
@@ -18,7 +18,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
18
18
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
19
19
|
* LICENSE file in the root directory of this source tree.
|
|
20
20
|
*/
|
|
21
|
-
const CSSGrid = React.forwardRef(({ align, as, children, className: customClassName, condensed = false, fullWidth = false, narrow = false, ...rest }, ref) => {
|
|
21
|
+
const CSSGrid = React.forwardRef(({ align, as, children, className: customClassName, condensed = false, fullWidth = false, narrow = false, withRowGap, ...rest }, ref) => {
|
|
22
22
|
const prefix = usePrefix();
|
|
23
23
|
const { subgrid } = useGridSettings();
|
|
24
24
|
let mode = "wide";
|
|
@@ -32,6 +32,7 @@ const CSSGrid = React.forwardRef(({ align, as, children, className: customClassN
|
|
|
32
32
|
as,
|
|
33
33
|
className: customClassName,
|
|
34
34
|
mode,
|
|
35
|
+
withRowGap,
|
|
35
36
|
...rest,
|
|
36
37
|
children
|
|
37
38
|
})
|
|
@@ -42,7 +43,8 @@ const CSSGrid = React.forwardRef(({ align, as, children, className: customClassN
|
|
|
42
43
|
[`${prefix}--css-grid--narrow`]: mode === "narrow",
|
|
43
44
|
[`${prefix}--css-grid--full-width`]: fullWidth,
|
|
44
45
|
[`${prefix}--css-grid--start`]: align === "start",
|
|
45
|
-
[`${prefix}--css-grid--end`]: align === "end"
|
|
46
|
+
[`${prefix}--css-grid--end`]: align === "end",
|
|
47
|
+
[`${prefix}--css-grid--with-row-gap`]: withRowGap
|
|
46
48
|
});
|
|
47
49
|
return /* @__PURE__ */ jsx(GridSettings, {
|
|
48
50
|
mode: "css-grid",
|
|
@@ -66,15 +68,17 @@ CSSGrid.propTypes = {
|
|
|
66
68
|
className: PropTypes.string,
|
|
67
69
|
condensed: PropTypes.bool,
|
|
68
70
|
fullWidth: PropTypes.bool,
|
|
69
|
-
narrow: PropTypes.bool
|
|
71
|
+
narrow: PropTypes.bool,
|
|
72
|
+
withRowGap: PropTypes.bool
|
|
70
73
|
};
|
|
71
|
-
const Subgrid = React.forwardRef(({ as, className: customClassName, children, mode, ...rest }, ref) => {
|
|
74
|
+
const Subgrid = React.forwardRef(({ as, className: customClassName, children, mode, withRowGap, ...rest }, ref) => {
|
|
72
75
|
const prefix = usePrefix();
|
|
73
76
|
const className = classNames(customClassName, {
|
|
74
77
|
[`${prefix}--subgrid`]: true,
|
|
75
78
|
[`${prefix}--subgrid--condensed`]: mode === "condensed",
|
|
76
79
|
[`${prefix}--subgrid--narrow`]: mode === "narrow",
|
|
77
|
-
[`${prefix}--subgrid--wide`]: mode === "wide"
|
|
80
|
+
[`${prefix}--subgrid--wide`]: mode === "wide",
|
|
81
|
+
[`${prefix}--subgrid--with-row-gap`]: withRowGap
|
|
78
82
|
});
|
|
79
83
|
return /* @__PURE__ */ jsx(as || "div", {
|
|
80
84
|
...rest,
|
|
@@ -91,7 +95,8 @@ Subgrid.propTypes = {
|
|
|
91
95
|
"wide",
|
|
92
96
|
"narrow",
|
|
93
97
|
"condensed"
|
|
94
|
-
])
|
|
98
|
+
]),
|
|
99
|
+
withRowGap: PropTypes.bool
|
|
95
100
|
};
|
|
96
101
|
const CSSGridComponent = CSSGrid;
|
|
97
102
|
//#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 };
|
|
@@ -12,7 +12,7 @@ import PropTypes from "prop-types";
|
|
|
12
12
|
import { jsx } from "react/jsx-runtime";
|
|
13
13
|
//#region src/components/Grid/ColumnHang.tsx
|
|
14
14
|
/**
|
|
15
|
-
* Copyright IBM Corp. 2016,
|
|
15
|
+
* Copyright IBM Corp. 2016, 2026
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|