@carbon/react 1.68.0-rc.0 → 1.69.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +743 -743
- package/README.md +3 -3
- package/es/components/Accordion/AccordionItem.js +0 -1
- package/es/components/Button/Button.js +6 -0
- package/es/components/CheckboxGroup/CheckboxGroup.js +1 -2
- package/es/components/CheckboxGroup/index.d.ts +10 -0
- package/es/components/ComboBox/ComboBox.d.ts +5 -0
- package/es/components/ComboBox/ComboBox.js +139 -54
- package/es/components/ComboButton/index.js +10 -3
- package/es/components/DataTable/TableCell.d.ts +1 -4
- package/es/components/DataTable/TableCell.js +3 -2
- package/es/components/DatePicker/DatePicker.js +10 -6
- package/es/components/Disclosure/index.d.ts +18 -0
- package/es/components/Dropdown/Dropdown.js +11 -9
- package/es/components/FileUploader/FileUploader.d.ts +8 -92
- package/es/components/FileUploader/FileUploader.js +116 -137
- package/es/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +15 -0
- package/es/components/FluidComboBox/FluidComboBox.Skeleton.js +1 -2
- package/es/components/FluidComboBox/FluidComboBox.d.ts +102 -0
- package/es/components/FluidComboBox/FluidComboBox.js +2 -3
- package/es/components/FluidComboBox/index.d.ts +13 -0
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +19 -0
- package/es/components/FluidDatePicker/FluidDatePicker.Skeleton.js +2 -2
- package/es/components/FluidDatePicker/FluidDatePicker.d.ts +39 -0
- package/es/components/FluidDatePicker/FluidDatePicker.js +2 -3
- package/es/components/FluidDatePicker/index.d.ts +13 -0
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.d.ts +10 -0
- package/es/components/FluidDatePickerInput/FluidDatePickerInput.js +1 -2
- package/es/components/FluidDatePickerInput/index.d.ts +9 -0
- package/es/components/IdPrefix/index.d.ts +26 -0
- package/es/components/Menu/MenuItem.js +1 -4
- package/es/components/MenuButton/index.d.ts +4 -0
- package/es/components/MenuButton/index.js +19 -5
- package/es/components/MultiSelect/MultiSelect.js +11 -9
- package/es/components/OverflowMenu/next/index.d.ts +4 -0
- package/es/components/OverflowMenu/next/index.js +19 -9
- package/es/components/PaginationNav/PaginationNav.js +1 -1
- package/es/components/Popover/index.js +18 -14
- package/es/components/Portal/index.d.ts +25 -0
- package/es/components/Slider/Slider.js +2 -2
- package/es/components/Tabs/usePressable.js +2 -0
- package/es/components/Tag/DismissibleTag.js +2 -2
- package/es/components/Tag/OperationalTag.d.ts +2 -10
- package/es/components/Tag/OperationalTag.js +2 -14
- package/es/components/Tag/SelectableTag.d.ts +2 -10
- package/es/components/Tag/SelectableTag.js +2 -16
- package/es/components/Toggle/Toggle.js +2 -0
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.d.ts +49 -0
- package/es/components/ToggleSmall/index.d.ts +7 -0
- package/es/components/TreeView/TreeNode.js +4 -2
- package/es/components/TreeView/TreeView.js +4 -4
- package/es/components/UIShell/SideNavMenuItem.d.ts +4 -3
- package/es/components/UIShell/SideNavMenuItem.js +1 -4
- package/es/index.js +6 -6
- package/es/internal/useIdPrefix.d.ts +9 -0
- package/lib/components/Accordion/AccordionItem.js +0 -1
- package/lib/components/Button/Button.js +6 -0
- package/lib/components/CheckboxGroup/CheckboxGroup.js +1 -2
- package/lib/components/CheckboxGroup/index.d.ts +10 -0
- package/lib/components/ComboBox/ComboBox.d.ts +5 -0
- package/lib/components/ComboBox/ComboBox.js +144 -59
- package/lib/components/ComboButton/index.js +12 -5
- package/lib/components/DataTable/TableCell.d.ts +1 -4
- package/lib/components/DataTable/TableCell.js +3 -2
- package/lib/components/DatePicker/DatePicker.js +9 -5
- package/lib/components/Disclosure/index.d.ts +18 -0
- package/lib/components/Dropdown/Dropdown.js +18 -16
- package/lib/components/FileUploader/FileUploader.d.ts +8 -92
- package/lib/components/FileUploader/FileUploader.js +113 -134
- package/lib/components/FileUploader/FileUploaderDropContainer.js +1 -1
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.d.ts +15 -0
- package/lib/components/FluidComboBox/FluidComboBox.Skeleton.js +1 -2
- package/lib/components/FluidComboBox/FluidComboBox.d.ts +102 -0
- package/lib/components/FluidComboBox/FluidComboBox.js +2 -3
- package/lib/components/FluidComboBox/index.d.ts +13 -0
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.d.ts +19 -0
- package/lib/components/FluidDatePicker/FluidDatePicker.Skeleton.js +2 -2
- package/lib/components/FluidDatePicker/FluidDatePicker.d.ts +39 -0
- package/lib/components/FluidDatePicker/FluidDatePicker.js +3 -4
- package/lib/components/FluidDatePicker/index.d.ts +13 -0
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.d.ts +10 -0
- package/lib/components/FluidDatePickerInput/FluidDatePickerInput.js +1 -2
- package/lib/components/FluidDatePickerInput/index.d.ts +9 -0
- package/lib/components/IdPrefix/index.d.ts +26 -0
- package/lib/components/Menu/MenuItem.js +1 -4
- package/lib/components/MenuButton/index.d.ts +4 -0
- package/lib/components/MenuButton/index.js +19 -5
- package/lib/components/MultiSelect/MultiSelect.js +18 -16
- package/lib/components/OverflowMenu/next/index.d.ts +4 -0
- package/lib/components/OverflowMenu/next/index.js +21 -11
- package/lib/components/PaginationNav/PaginationNav.js +1 -1
- package/lib/components/Popover/index.js +18 -14
- package/lib/components/Portal/index.d.ts +25 -0
- package/lib/components/Slider/Slider.js +2 -2
- package/lib/components/Tabs/usePressable.js +2 -0
- package/lib/components/Tag/DismissibleTag.js +2 -2
- package/lib/components/Tag/OperationalTag.d.ts +2 -10
- package/lib/components/Tag/OperationalTag.js +2 -14
- package/lib/components/Tag/SelectableTag.d.ts +2 -10
- package/lib/components/Tag/SelectableTag.js +2 -16
- package/lib/components/Toggle/Toggle.js +2 -0
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.d.ts +49 -0
- package/lib/components/ToggleSmall/index.d.ts +7 -0
- package/lib/components/TreeView/TreeNode.js +4 -2
- package/lib/components/TreeView/TreeView.js +4 -4
- package/lib/components/UIShell/SideNavMenuItem.d.ts +4 -3
- package/lib/components/UIShell/SideNavMenuItem.js +1 -4
- package/lib/index.js +12 -12
- package/lib/internal/useIdPrefix.d.ts +9 -0
- package/package.json +7 -7
- package/telemetry.yml +809 -809
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React
|
|
8
|
+
import React from 'react';
|
|
9
9
|
import { PolymorphicProps } from '../../types/common';
|
|
10
10
|
import { SIZES } from './Tag';
|
|
11
11
|
export interface SelectableTagBaseProps {
|
|
@@ -35,10 +35,6 @@ export interface SelectableTagBaseProps {
|
|
|
35
35
|
* `md` (default) or `lg` sizes.
|
|
36
36
|
*/
|
|
37
37
|
size?: keyof typeof SIZES;
|
|
38
|
-
/**
|
|
39
|
-
* **Experimental:** Provide a `Slug` component to be rendered inside the `SelectableTag` component
|
|
40
|
-
*/
|
|
41
|
-
slug?: ReactNode;
|
|
42
38
|
/**
|
|
43
39
|
* Provide text to be rendered inside of a the tag.
|
|
44
40
|
*/
|
|
@@ -46,7 +42,7 @@ export interface SelectableTagBaseProps {
|
|
|
46
42
|
}
|
|
47
43
|
export type SelectableTagProps<T extends React.ElementType> = PolymorphicProps<T, SelectableTagBaseProps>;
|
|
48
44
|
declare const SelectableTag: {
|
|
49
|
-
<T extends React.ElementType<any, keyof React.JSX.IntrinsicElements>>({ className, disabled, id, renderIcon, selected,
|
|
45
|
+
<T extends React.ElementType<any, keyof React.JSX.IntrinsicElements>>({ className, disabled, id, renderIcon, selected, size, text, ...other }: SelectableTagProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
50
46
|
propTypes: {
|
|
51
47
|
/**
|
|
52
48
|
* Provide a custom className that is applied to the containing <span>
|
|
@@ -74,10 +70,6 @@ declare const SelectableTag: {
|
|
|
74
70
|
* `md` (default) or `lg` sizes.
|
|
75
71
|
*/
|
|
76
72
|
size: PropTypes.Requireable<string>;
|
|
77
|
-
/**
|
|
78
|
-
* **Experimental:** Provide a `Slug` component to be rendered inside the `SelectableTag` component
|
|
79
|
-
*/
|
|
80
|
-
slug: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
81
73
|
/**
|
|
82
74
|
* Provide text to be rendered inside of a the tag.
|
|
83
75
|
*/
|
|
@@ -25,7 +25,6 @@ const SelectableTag = _ref => {
|
|
|
25
25
|
id,
|
|
26
26
|
renderIcon,
|
|
27
27
|
selected = false,
|
|
28
|
-
slug,
|
|
29
28
|
size,
|
|
30
29
|
text,
|
|
31
30
|
...other
|
|
@@ -42,13 +41,6 @@ const SelectableTag = _ref => {
|
|
|
42
41
|
const newElement = tagRef.current?.getElementsByClassName(`${prefix}--tag__label`)[0];
|
|
43
42
|
setIsEllipsisApplied(isEllipsisActive(newElement));
|
|
44
43
|
}, [prefix, tagRef]);
|
|
45
|
-
let normalizedSlug;
|
|
46
|
-
if (slug && slug['type']?.displayName === 'AILabel') {
|
|
47
|
-
normalizedSlug = /*#__PURE__*/React__default.cloneElement(slug, {
|
|
48
|
-
size: 'sm',
|
|
49
|
-
kind: 'inline'
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
44
|
const tooltipClasses = cx(`${prefix}--icon-tooltip`, `${prefix}--tag-label-tooltip`);
|
|
53
45
|
|
|
54
46
|
// Removing onClick from the spread operator
|
|
@@ -67,7 +59,6 @@ const SelectableTag = _ref => {
|
|
|
67
59
|
}, /*#__PURE__*/React__default.createElement(Tag, _extends({
|
|
68
60
|
"aria-pressed": selectedTag,
|
|
69
61
|
ref: tagRef,
|
|
70
|
-
slug: slug,
|
|
71
62
|
size: size,
|
|
72
63
|
renderIcon: renderIcon,
|
|
73
64
|
disabled: disabled,
|
|
@@ -77,19 +68,18 @@ const SelectableTag = _ref => {
|
|
|
77
68
|
}, otherProps), /*#__PURE__*/React__default.createElement(Text, {
|
|
78
69
|
title: text,
|
|
79
70
|
className: `${prefix}--tag__label`
|
|
80
|
-
}, text)
|
|
71
|
+
}, text)));
|
|
81
72
|
}
|
|
82
73
|
return /*#__PURE__*/React__default.createElement(Tag, _extends({
|
|
83
74
|
"aria-pressed": selectedTag,
|
|
84
75
|
ref: tagRef,
|
|
85
|
-
slug: slug,
|
|
86
76
|
size: size,
|
|
87
77
|
renderIcon: renderIcon,
|
|
88
78
|
disabled: disabled,
|
|
89
79
|
className: tagClasses,
|
|
90
80
|
id: tagId,
|
|
91
81
|
onClick: () => setSelectedTag(!selectedTag)
|
|
92
|
-
}, otherProps),
|
|
82
|
+
}, otherProps), /*#__PURE__*/React__default.createElement(Text, {
|
|
93
83
|
title: text,
|
|
94
84
|
className: `${prefix}--tag__label`
|
|
95
85
|
}, text));
|
|
@@ -121,10 +111,6 @@ SelectableTag.propTypes = {
|
|
|
121
111
|
* `md` (default) or `lg` sizes.
|
|
122
112
|
*/
|
|
123
113
|
size: PropTypes.oneOf(Object.keys(SIZES)),
|
|
124
|
-
/**
|
|
125
|
-
* **Experimental:** Provide a `Slug` component to be rendered inside the `SelectableTag` component
|
|
126
|
-
*/
|
|
127
|
-
slug: PropTypes.node,
|
|
128
114
|
/**
|
|
129
115
|
* Provide text to be rendered inside of a the tag.
|
|
130
116
|
*/
|
|
@@ -103,6 +103,8 @@ function Toggle(_ref) {
|
|
|
103
103
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
104
104
|
className: switchClasses
|
|
105
105
|
}, isSm && /*#__PURE__*/React__default.createElement("svg", {
|
|
106
|
+
"aria-hidden": "true",
|
|
107
|
+
focusable: "false",
|
|
106
108
|
className: `${prefix}--toggle__check`,
|
|
107
109
|
width: "6px",
|
|
108
110
|
height: "5px",
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
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
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import React from 'react';
|
|
9
|
+
interface ToggleSmallSkeletonProps {
|
|
10
|
+
['aria-label']: string;
|
|
11
|
+
/**
|
|
12
|
+
* Specify an optional className to add to the form item wrapper.
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Provide an id that unique represents the underlying `<input>`
|
|
17
|
+
*/
|
|
18
|
+
id?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Provide the text that will be read by a screen reader when visiting this
|
|
21
|
+
* control
|
|
22
|
+
* `aria-label` is always required but will be null if `labelText` is also
|
|
23
|
+
* provided
|
|
24
|
+
*/
|
|
25
|
+
labelText?: string;
|
|
26
|
+
}
|
|
27
|
+
declare class ToggleSmallSkeleton extends React.Component<ToggleSmallSkeletonProps> {
|
|
28
|
+
static propTypes: {
|
|
29
|
+
"aria-label": PropTypes.Validator<string>;
|
|
30
|
+
/**
|
|
31
|
+
* Specify an optional className to add to the form item wrapper.
|
|
32
|
+
*/
|
|
33
|
+
className: PropTypes.Requireable<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Provide an id that unique represents the underlying `<input>`
|
|
36
|
+
*/
|
|
37
|
+
id: PropTypes.Requireable<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Provide the text that will be read by a screen reader when visiting this
|
|
40
|
+
* control
|
|
41
|
+
* `aria-label` is always required but will be null if `labelText` is also
|
|
42
|
+
* provided
|
|
43
|
+
*/
|
|
44
|
+
labelText: PropTypes.Requireable<string>;
|
|
45
|
+
};
|
|
46
|
+
render(): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
}
|
|
48
|
+
export default ToggleSmallSkeleton;
|
|
49
|
+
export { ToggleSmallSkeleton };
|
|
@@ -271,9 +271,11 @@ const TreeNode = /*#__PURE__*/React__default.forwardRef((_ref, forwardedRef) =>
|
|
|
271
271
|
className: `${prefix}--tree-node__label__details`
|
|
272
272
|
}, Icon && /*#__PURE__*/React__default.createElement(Icon, {
|
|
273
273
|
className: `${prefix}--tree-node__icon`
|
|
274
|
-
}), label)),
|
|
274
|
+
}), label)), /*#__PURE__*/React__default.createElement("ul", {
|
|
275
275
|
role: "group",
|
|
276
|
-
className: `${prefix}--tree-node__children
|
|
276
|
+
className: cx(`${prefix}--tree-node__children`, {
|
|
277
|
+
[`${prefix}--tree-node--hidden`]: !expanded
|
|
278
|
+
})
|
|
277
279
|
}, nodesWithProps));
|
|
278
280
|
});
|
|
279
281
|
TreeNode.propTypes = {
|
|
@@ -151,12 +151,12 @@ const TreeView = _ref => {
|
|
|
151
151
|
}])) {
|
|
152
152
|
const nodeIds = [];
|
|
153
153
|
if (matches(event, [Home, End])) {
|
|
154
|
-
if (multiselect && event.shiftKey && event.ctrlKey && treeWalker.current.currentNode instanceof Element && !treeWalker.current.currentNode.getAttribute('aria-disabled')) {
|
|
154
|
+
if (multiselect && event.shiftKey && event.ctrlKey && treeWalker.current.currentNode instanceof Element && !treeWalker.current.currentNode.getAttribute('aria-disabled') && !treeWalker.current.currentNode.classList.contains(`${prefix}--tree-node--hidden`)) {
|
|
155
155
|
nodeIds.push(treeWalker.current.currentNode?.id);
|
|
156
156
|
}
|
|
157
157
|
while (match(event, Home) ? treeWalker.current.previousNode() : treeWalker.current.nextNode()) {
|
|
158
158
|
nextFocusNode = treeWalker.current.currentNode;
|
|
159
|
-
if (multiselect && event.shiftKey && event.ctrlKey && nextFocusNode instanceof Element && !nextFocusNode.getAttribute('aria-disabled')) {
|
|
159
|
+
if (multiselect && event.shiftKey && event.ctrlKey && nextFocusNode instanceof Element && !nextFocusNode.getAttribute('aria-disabled') && !nextFocusNode.classList.contains(`${prefix}--tree-node--hidden`)) {
|
|
160
160
|
nodeIds.push(nextFocusNode?.id);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
@@ -167,7 +167,7 @@ const TreeView = _ref => {
|
|
|
167
167
|
}) && event.ctrlKey) {
|
|
168
168
|
treeWalker.current.currentNode = treeWalker.current.root;
|
|
169
169
|
while (treeWalker.current.nextNode()) {
|
|
170
|
-
if (treeWalker.current.currentNode instanceof Element && !treeWalker.current.currentNode.getAttribute('aria-disabled')) {
|
|
170
|
+
if (treeWalker.current.currentNode instanceof Element && !treeWalker.current.currentNode.getAttribute('aria-disabled') && !treeWalker.current.currentNode.classList.contains(`${prefix}--tree-node--hidden`)) {
|
|
171
171
|
nodeIds.push(treeWalker.current.currentNode?.id);
|
|
172
172
|
}
|
|
173
173
|
}
|
|
@@ -189,7 +189,7 @@ const TreeView = _ref => {
|
|
|
189
189
|
if (!(node instanceof Element)) {
|
|
190
190
|
return NodeFilter.FILTER_SKIP;
|
|
191
191
|
}
|
|
192
|
-
if (node.classList.contains(`${prefix}--tree-node--disabled`)) {
|
|
192
|
+
if (node.classList.contains(`${prefix}--tree-node--disabled`) || node.classList.contains(`${prefix}--tree-node--hidden`)) {
|
|
193
193
|
return NodeFilter.FILTER_REJECT;
|
|
194
194
|
}
|
|
195
195
|
if (node.matches(`li.${prefix}--tree-node`)) {
|
|
@@ -4,8 +4,9 @@
|
|
|
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, {
|
|
8
|
-
|
|
7
|
+
import React, { ComponentProps } from 'react';
|
|
8
|
+
import Link from './Link';
|
|
9
|
+
interface SideNavMenuItemProps extends ComponentProps<typeof Link> {
|
|
9
10
|
/**
|
|
10
11
|
* Specify the children to be rendered inside of the `SideNavMenuItem`
|
|
11
12
|
*/
|
|
@@ -25,5 +26,5 @@ interface SideNavMenuItemProps extends HTMLAttributes<HTMLElement> {
|
|
|
25
26
|
*/
|
|
26
27
|
href?: string;
|
|
27
28
|
}
|
|
28
|
-
declare const SideNavMenuItem: React.ForwardRefExoticComponent<SideNavMenuItemProps & React.RefAttributes<HTMLElement>>;
|
|
29
|
+
declare const SideNavMenuItem: React.ForwardRefExoticComponent<Omit<SideNavMenuItemProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
29
30
|
export default SideNavMenuItem;
|
|
@@ -19,7 +19,6 @@ const SideNavMenuItem = /*#__PURE__*/React__default.forwardRef(function SideNavM
|
|
|
19
19
|
children,
|
|
20
20
|
className: customClassName,
|
|
21
21
|
isActive,
|
|
22
|
-
href,
|
|
23
22
|
...rest
|
|
24
23
|
} = props;
|
|
25
24
|
const className = cx(`${prefix}--side-nav__menu-item`, customClassName);
|
|
@@ -29,9 +28,7 @@ const SideNavMenuItem = /*#__PURE__*/React__default.forwardRef(function SideNavM
|
|
|
29
28
|
});
|
|
30
29
|
return /*#__PURE__*/React__default.createElement("li", {
|
|
31
30
|
className: className
|
|
32
|
-
}, /*#__PURE__*/React__default.createElement(Link, _extends({
|
|
33
|
-
href: href
|
|
34
|
-
}, rest, {
|
|
31
|
+
}, /*#__PURE__*/React__default.createElement(Link, _extends({}, rest, {
|
|
35
32
|
className: linkClassName,
|
|
36
33
|
ref: ref
|
|
37
34
|
}), /*#__PURE__*/React__default.createElement(SideNavLinkText, null, children)));
|
package/es/index.js
CHANGED
|
@@ -18,6 +18,7 @@ export { default as ButtonSkeleton } from './components/Button/Button.Skeleton.j
|
|
|
18
18
|
export { default as ButtonSet } from './components/ButtonSet/ButtonSet.js';
|
|
19
19
|
export { default as Checkbox } from './components/Checkbox/Checkbox.js';
|
|
20
20
|
export { default as CheckboxSkeleton } from './components/Checkbox/Checkbox.Skeleton.js';
|
|
21
|
+
export { default as CheckboxGroup } from './components/CheckboxGroup/CheckboxGroup.js';
|
|
21
22
|
export { ClassPrefix } from './components/ClassPrefix/index.js';
|
|
22
23
|
export { default as CodeSnippet } from './components/CodeSnippet/CodeSnippet.js';
|
|
23
24
|
export { default as CodeSnippetSkeleton } from './components/CodeSnippet/CodeSnippet.Skeleton.js';
|
|
@@ -159,6 +160,11 @@ export { default as SideNavMenuItem } from './components/UIShell/SideNavMenuItem
|
|
|
159
160
|
export { default as SideNavSwitcher } from './components/UIShell/SideNavSwitcher.js';
|
|
160
161
|
export { default as UnorderedList } from './components/UnorderedList/UnorderedList.js';
|
|
161
162
|
export { FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags } from './components/FeatureFlags/index.js';
|
|
163
|
+
export { default as unstable__FluidComboBox } from './components/FluidComboBox/FluidComboBox.js';
|
|
164
|
+
export { default as unstable__FluidComboBoxSkeleton } from './components/FluidComboBox/FluidComboBox.Skeleton.js';
|
|
165
|
+
export { default as unstable__FluidDatePicker } from './components/FluidDatePicker/FluidDatePicker.js';
|
|
166
|
+
export { default as unstable__FluidDatePickerSkeleton } from './components/FluidDatePicker/FluidDatePicker.Skeleton.js';
|
|
167
|
+
export { default as unstable__FluidDatePickerInput } from './components/FluidDatePickerInput/FluidDatePickerInput.js';
|
|
162
168
|
export { default as unstable__FluidMultiSelect } from './components/FluidMultiSelect/FluidMultiSelect.js';
|
|
163
169
|
export { default as unstable__FluidMultiSelectSkeleton } from './components/FluidMultiSelect/FluidMultiSelect.Skeleton.js';
|
|
164
170
|
export { default as unstable__FluidSelect } from './components/FluidSelect/FluidSelect.js';
|
|
@@ -192,7 +198,6 @@ import './components/Text/index.js';
|
|
|
192
198
|
export { GlobalTheme, Theme, ThemeContext, usePrefersDarkScheme, useTheme } from './components/Theme/index.js';
|
|
193
199
|
export { PrefixContext, usePrefix } from './internal/usePrefix.js';
|
|
194
200
|
export { useIdPrefix } from './internal/useIdPrefix.js';
|
|
195
|
-
export { default as unstable__FluidDatePickerSkeleton } from './components/FluidDatePicker/FluidDatePicker.Skeleton.js';
|
|
196
201
|
export { default as unstable_PageSelector } from './components/Pagination/experimental/PageSelector.js';
|
|
197
202
|
export { default as unstable_Pagination } from './components/Pagination/experimental/Pagination.js';
|
|
198
203
|
export { default as ContainedListItem } from './components/ContainedList/ContainedListItem/ContainedListItem.js';
|
|
@@ -201,17 +206,12 @@ export { default as useContextMenu } from './components/ContextMenu/useContextMe
|
|
|
201
206
|
export { default as SliderSkeleton } from './components/Slider/Slider.Skeleton.js';
|
|
202
207
|
export { default as TextInputSkeleton } from './components/TextInput/TextInput.Skeleton.js';
|
|
203
208
|
export { default as TextInput } from './components/TextInput/TextInput.js';
|
|
204
|
-
export { default as unstable__FluidComboBox } from './components/FluidComboBox/FluidComboBox.js';
|
|
205
|
-
export { default as unstable__FluidComboBoxSkeleton } from './components/FluidComboBox/FluidComboBox.Skeleton.js';
|
|
206
|
-
export { default as unstable__FluidDatePicker } from './components/FluidDatePicker/FluidDatePicker.js';
|
|
207
|
-
export { default as unstable__FluidDatePickerInput } from './components/FluidDatePickerInput/FluidDatePickerInput.js';
|
|
208
209
|
export { default as unstable__FluidDropdown } from './components/FluidDropdown/FluidDropdown.js';
|
|
209
210
|
export { default as unstable__FluidDropdownSkeleton } from './components/FluidDropdown/FluidDropdown.Skeleton.js';
|
|
210
211
|
export { LayoutDirection as unstable_LayoutDirection } from './components/LayoutDirection/LayoutDirection.js';
|
|
211
212
|
export { useLayoutDirection as unstable_useLayoutDirection } from './components/LayoutDirection/useLayoutDirection.js';
|
|
212
213
|
export { Text as unstable_Text } from './components/Text/Text.js';
|
|
213
214
|
export { TextDirection as unstable_TextDirection } from './components/Text/TextDirection.js';
|
|
214
|
-
export { default as CheckboxGroup } from './components/CheckboxGroup/CheckboxGroup.js';
|
|
215
215
|
export { default as DataTable } from './components/DataTable/DataTable.js';
|
|
216
216
|
export { Table } from './components/DataTable/Table.js';
|
|
217
217
|
export { default as TableActionList } from './components/DataTable/TableActionList.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
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
|
+
import React from 'react';
|
|
8
|
+
export declare const IdPrefixContext: React.Context<string | null | undefined>;
|
|
9
|
+
export declare function useIdPrefix(): string | null | undefined;
|
|
@@ -118,7 +118,6 @@ function AccordionItem(_ref) {
|
|
|
118
118
|
className: `${prefix}--accordion__title`
|
|
119
119
|
}, title)), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
120
120
|
ref: content,
|
|
121
|
-
hidden: !isOpen,
|
|
122
121
|
className: `${prefix}--accordion__wrapper`,
|
|
123
122
|
onTransitionEnd: onAnimationEnd
|
|
124
123
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -35,6 +35,7 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef(function Button
|
|
|
35
35
|
const tooltipRef = React.useRef(null);
|
|
36
36
|
const {
|
|
37
37
|
as,
|
|
38
|
+
autoAlign = false,
|
|
38
39
|
children,
|
|
39
40
|
hasIconOnly = false,
|
|
40
41
|
iconDescription,
|
|
@@ -93,6 +94,7 @@ const Button = /*#__PURE__*/React__default["default"].forwardRef(function Button
|
|
|
93
94
|
onMouseLeave: onMouseLeave,
|
|
94
95
|
onFocus: onFocus,
|
|
95
96
|
onBlur: onBlur,
|
|
97
|
+
autoAlign: autoAlign,
|
|
96
98
|
onClick: events.composeEventHandlers([onClick, handleClick]),
|
|
97
99
|
renderIcon: iconOnlyImage ? null : ButtonImageElement // avoid doubling the icon.
|
|
98
100
|
}), iconOnlyImage ?? children);
|
|
@@ -105,6 +107,10 @@ Button.propTypes = {
|
|
|
105
107
|
* Make sure to apply all props to the root node and render children appropriately
|
|
106
108
|
*/
|
|
107
109
|
as: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].string, PropTypes__default["default"].elementType]),
|
|
110
|
+
/**
|
|
111
|
+
* **Experimental**: Will attempt to automatically align the tooltip
|
|
112
|
+
*/
|
|
113
|
+
autoAlign: PropTypes__default["default"].bool,
|
|
108
114
|
/**
|
|
109
115
|
* Specify the content of your Button
|
|
110
116
|
*/
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2023
|
|
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
|
+
import CheckboxGroup from './CheckboxGroup';
|
|
8
|
+
import { type CheckboxGroupProps, type CustomType } from './CheckboxGroup';
|
|
9
|
+
export default CheckboxGroup;
|
|
10
|
+
export { CheckboxGroup, type CheckboxGroupProps, type CustomType };
|
|
@@ -158,6 +158,7 @@ export interface ComboBoxProps<ItemType> extends Omit<InputHTMLAttributes<HTMLIn
|
|
|
158
158
|
* Specify your own filtering logic by passing in a `shouldFilterItem`
|
|
159
159
|
* function that takes in the current input and an item and passes back
|
|
160
160
|
* whether or not the item should be filtered.
|
|
161
|
+
* this prop will be ignored if `typeahead` prop is enabled
|
|
161
162
|
*/
|
|
162
163
|
shouldFilterItem?: (input: {
|
|
163
164
|
item: ItemType;
|
|
@@ -177,6 +178,10 @@ export interface ComboBoxProps<ItemType> extends Omit<InputHTMLAttributes<HTMLIn
|
|
|
177
178
|
* combobox via ARIA attributes.
|
|
178
179
|
*/
|
|
179
180
|
titleText?: ReactNode;
|
|
181
|
+
/**
|
|
182
|
+
* **Experimental**: will enable autcomplete and typeahead for the input field
|
|
183
|
+
*/
|
|
184
|
+
typeahead?: boolean;
|
|
180
185
|
/**
|
|
181
186
|
* Specify whether the control is currently in warning state
|
|
182
187
|
*/
|