@carbon/react 1.57.0 → 1.58.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 +1106 -990
- package/es/components/Accordion/Accordion.d.ts +1 -1
- package/es/components/Accordion/index.d.ts +2 -2
- package/es/components/Button/Button.js +2 -2
- package/es/components/Button/index.d.ts +2 -1
- package/es/components/Checkbox/Checkbox.d.ts +6 -7
- package/es/components/ComboBox/ComboBox.d.ts +4 -5
- package/es/components/ComboBox/ComboBox.js +268 -261
- package/es/components/ComposedModal/ComposedModal.d.ts +1 -2
- package/es/components/DataTable/TableHeader.d.ts +4 -5
- package/es/components/DataTable/TableSlugRow.d.ts +3 -2
- package/es/components/DatePicker/DatePicker.d.ts +4 -5
- package/es/components/Dropdown/Dropdown.d.ts +6 -7
- package/es/components/Dropdown/index.d.ts +2 -2
- package/es/components/FormLabel/index.d.ts +2 -2
- package/es/components/Grid/Column.d.ts +2 -2
- package/es/components/Grid/GridTypes.d.ts +1 -2
- package/es/components/Grid/index.d.ts +3 -1
- package/es/components/IconButton/index.d.ts +3 -4
- package/es/components/InlineLoading/index.d.ts +2 -2
- package/es/components/ListBox/next/ListBoxTrigger.js +1 -0
- package/es/components/Loading/index.d.ts +2 -2
- package/es/components/Menu/Menu.js +1 -1
- package/es/components/Menu/MenuItem.js +13 -2
- package/es/components/Modal/Modal.d.ts +8 -9
- package/es/components/Modal/index.d.ts +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +1 -2
- package/es/components/MultiSelect/MultiSelect.d.ts +10 -9
- package/es/components/Notification/Notification.d.ts +2 -2
- package/es/components/NumberInput/NumberInput.d.ts +12 -2
- package/es/components/NumberInput/NumberInput.js +2 -2
- package/es/components/NumberInput/index.d.ts +1 -1
- package/es/components/OverflowMenu/OverflowMenu.d.ts +10 -6
- package/es/components/OverflowMenu/index.d.ts +13 -0
- package/es/components/PasswordInput/index.d.ts +3 -0
- package/es/components/Popover/index.d.ts +8 -2
- package/es/components/Popover/index.js +26 -1
- package/es/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/es/components/ProgressBar/index.d.ts +2 -2
- package/es/components/ProgressIndicator/ProgressIndicator.d.ts +2 -2
- package/es/components/ProgressIndicator/index.d.ts +2 -0
- package/es/components/RadioButton/RadioButton.d.ts +3 -4
- package/es/components/RadioButtonGroup/RadioButtonGroup.d.ts +7 -8
- package/es/components/Select/Select.d.ts +1 -2
- package/es/components/Slider/Slider.d.ts +5 -5
- package/es/components/Slider/Slider.js +1 -1
- package/es/components/StructuredList/index.d.ts +2 -0
- package/es/components/Switch/Switch.d.ts +1 -1
- package/es/components/Switch/index.d.ts +2 -2
- package/es/components/Tab/index.d.ts +2 -1
- package/es/components/Tag/DismissibleTag.d.ts +12 -12
- package/es/components/Tag/DismissibleTag.js +34 -9
- package/es/components/Tag/OperationalTag.d.ts +12 -12
- package/es/components/Tag/OperationalTag.js +45 -9
- package/es/components/Tag/SelectableTag.d.ts +12 -12
- package/es/components/Tag/SelectableTag.js +46 -10
- package/es/components/Tag/Tag.d.ts +3 -3
- package/es/components/Tag/Tag.js +31 -5
- package/es/components/TextArea/TextArea.d.ts +6 -7
- package/es/components/TextArea/index.d.ts +2 -2
- package/es/components/TextInput/PasswordInput.d.ts +5 -6
- package/es/components/TextInput/PasswordInput.js +2 -2
- package/es/components/TextInput/TextInput.d.ts +1 -2
- package/es/components/TextInput/index.d.ts +4 -2
- package/es/components/Theme/index.d.ts +1 -0
- package/es/components/Theme/index.js +8 -2
- package/es/components/Tile/Tile.d.ts +3 -4
- package/es/components/TileGroup/TileGroup.d.ts +3 -2
- package/es/components/TileGroup/index.d.ts +9 -0
- package/es/components/Toggle/Toggle.js +1 -1
- package/es/components/Tooltip/DefinitionTooltip.js +1 -1
- package/es/components/Tooltip/Tooltip.js +16 -5
- package/es/components/Tooltip/index.d.ts +2 -2
- package/es/components/UnorderedList/UnorderedList.d.ts +1 -1
- package/es/components/UnorderedList/index.d.ts +1 -0
- package/es/index.js +4 -4
- package/es/prop-types/deprecateValuesWithin.js +35 -0
- package/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/index.d.ts +2 -2
- package/lib/components/Button/Button.js +2 -2
- package/lib/components/Button/index.d.ts +2 -1
- package/lib/components/Checkbox/Checkbox.d.ts +6 -7
- package/lib/components/ComboBox/ComboBox.d.ts +4 -5
- package/lib/components/ComboBox/ComboBox.js +267 -261
- package/lib/components/ComposedModal/ComposedModal.d.ts +1 -2
- package/lib/components/DataTable/TableHeader.d.ts +4 -5
- package/lib/components/DataTable/TableSlugRow.d.ts +3 -2
- package/lib/components/DatePicker/DatePicker.d.ts +4 -5
- package/lib/components/Dropdown/Dropdown.d.ts +6 -7
- package/lib/components/Dropdown/index.d.ts +2 -2
- package/lib/components/FormLabel/index.d.ts +2 -2
- package/lib/components/Grid/Column.d.ts +2 -2
- package/lib/components/Grid/GridTypes.d.ts +1 -2
- package/lib/components/Grid/index.d.ts +3 -1
- package/lib/components/IconButton/index.d.ts +3 -4
- package/lib/components/InlineLoading/index.d.ts +2 -2
- package/lib/components/ListBox/next/ListBoxTrigger.js +1 -0
- package/lib/components/Loading/index.d.ts +2 -2
- package/lib/components/Menu/Menu.js +1 -1
- package/lib/components/Menu/MenuItem.js +13 -2
- package/lib/components/Modal/Modal.d.ts +8 -9
- package/lib/components/Modal/index.d.ts +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +1 -2
- package/lib/components/MultiSelect/MultiSelect.d.ts +10 -9
- package/lib/components/Notification/Notification.d.ts +2 -2
- package/lib/components/NumberInput/NumberInput.d.ts +12 -2
- package/lib/components/NumberInput/NumberInput.js +2 -2
- package/lib/components/NumberInput/index.d.ts +1 -1
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +10 -6
- package/lib/components/OverflowMenu/index.d.ts +13 -0
- package/lib/components/PasswordInput/index.d.ts +3 -0
- package/lib/components/Popover/index.d.ts +8 -2
- package/lib/components/Popover/index.js +26 -1
- package/lib/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/lib/components/ProgressBar/index.d.ts +2 -2
- package/lib/components/ProgressIndicator/ProgressIndicator.d.ts +2 -2
- package/lib/components/ProgressIndicator/index.d.ts +2 -0
- package/lib/components/RadioButton/RadioButton.d.ts +3 -4
- package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +7 -8
- package/lib/components/Select/Select.d.ts +1 -2
- package/lib/components/Slider/Slider.d.ts +5 -5
- package/lib/components/Slider/Slider.js +1 -1
- package/lib/components/StructuredList/index.d.ts +2 -0
- package/lib/components/Switch/Switch.d.ts +1 -1
- package/lib/components/Switch/index.d.ts +2 -2
- package/lib/components/Tab/index.d.ts +2 -1
- package/lib/components/Tag/DismissibleTag.d.ts +12 -12
- package/lib/components/Tag/DismissibleTag.js +33 -8
- package/lib/components/Tag/OperationalTag.d.ts +12 -12
- package/lib/components/Tag/OperationalTag.js +44 -8
- package/lib/components/Tag/SelectableTag.d.ts +12 -12
- package/lib/components/Tag/SelectableTag.js +45 -9
- package/lib/components/Tag/Tag.d.ts +3 -3
- package/lib/components/Tag/Tag.js +30 -4
- package/lib/components/TextArea/TextArea.d.ts +6 -7
- package/lib/components/TextArea/index.d.ts +2 -2
- package/lib/components/TextInput/PasswordInput.d.ts +5 -6
- package/lib/components/TextInput/PasswordInput.js +2 -2
- package/lib/components/TextInput/TextInput.d.ts +1 -2
- package/lib/components/TextInput/index.d.ts +4 -2
- package/lib/components/Theme/index.d.ts +1 -0
- package/lib/components/Theme/index.js +8 -1
- package/lib/components/Tile/Tile.d.ts +3 -4
- package/lib/components/TileGroup/TileGroup.d.ts +3 -2
- package/lib/components/TileGroup/index.d.ts +9 -0
- package/lib/components/Toggle/Toggle.js +1 -1
- package/lib/components/Tooltip/DefinitionTooltip.js +1 -1
- package/lib/components/Tooltip/Tooltip.js +16 -5
- package/lib/components/Tooltip/index.d.ts +2 -2
- package/lib/components/UnorderedList/UnorderedList.d.ts +1 -1
- package/lib/components/UnorderedList/index.d.ts +1 -0
- package/lib/index.js +30 -29
- package/lib/prop-types/deprecateValuesWithin.js +39 -0
- package/package.json +6 -6
- package/es/components/TileGroup/index.js +0 -13
- package/lib/components/TileGroup/index.js +0 -18
|
@@ -4,8 +4,8 @@
|
|
|
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 Accordion from './Accordion';
|
|
7
|
+
import Accordion, { type AccordionProps } from './Accordion';
|
|
8
8
|
export default Accordion;
|
|
9
|
-
export { Accordion };
|
|
9
|
+
export { Accordion, type AccordionProps };
|
|
10
10
|
export { default as AccordionItem } from './AccordionItem';
|
|
11
11
|
export { default as AccordionSkeleton } from './Accordion.Skeleton';
|
|
@@ -64,10 +64,10 @@ const Button = /*#__PURE__*/React__default.forwardRef(function Button(props, ref
|
|
|
64
64
|
align = tooltipPosition;
|
|
65
65
|
}
|
|
66
66
|
if (tooltipAlignment === 'end') {
|
|
67
|
-
align = `${tooltipPosition}-
|
|
67
|
+
align = `${tooltipPosition}-end`;
|
|
68
68
|
}
|
|
69
69
|
if (tooltipAlignment === 'start') {
|
|
70
|
-
align = `${tooltipPosition}-
|
|
70
|
+
align = `${tooltipPosition}-start`;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
if (tooltipPosition === 'right' || tooltipPosition === 'left') {
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import Button from './Button';
|
|
8
|
+
import { type ButtonProps } from './Button';
|
|
8
9
|
export default Button;
|
|
9
|
-
export { Button };
|
|
10
|
+
export { Button, type ButtonProps };
|
|
10
11
|
export * from './Button';
|
|
11
12
|
export { default as ButtonSkeleton } from './Button.Skeleton';
|
|
@@ -4,8 +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 {
|
|
8
|
-
import React from 'react';
|
|
7
|
+
import React, { ReactNode } from 'react';
|
|
9
8
|
type ExcludedAttributes = 'id' | 'onChange' | 'onClick' | 'type';
|
|
10
9
|
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, ExcludedAttributes> {
|
|
11
10
|
/**
|
|
@@ -16,7 +15,7 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
16
15
|
* Provide a label to provide a description of the Checkbox input that you are
|
|
17
16
|
* exposing to the user
|
|
18
17
|
*/
|
|
19
|
-
labelText: NonNullable<
|
|
18
|
+
labelText: NonNullable<ReactNode>;
|
|
20
19
|
/**
|
|
21
20
|
* Specify whether the underlying input should be checked by default
|
|
22
21
|
*/
|
|
@@ -28,7 +27,7 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
28
27
|
/**
|
|
29
28
|
* Provide text for the form group for additional help
|
|
30
29
|
*/
|
|
31
|
-
helperText?:
|
|
30
|
+
helperText?: ReactNode;
|
|
32
31
|
/**
|
|
33
32
|
* Specify whether the label should be hidden, or not
|
|
34
33
|
*/
|
|
@@ -44,11 +43,11 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
44
43
|
/**
|
|
45
44
|
* Provide the text that is displayed when the Checkbox is in an invalid state
|
|
46
45
|
*/
|
|
47
|
-
invalidText?:
|
|
46
|
+
invalidText?: ReactNode;
|
|
48
47
|
/**
|
|
49
48
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `Checkbox` component
|
|
50
49
|
*/
|
|
51
|
-
slug?:
|
|
50
|
+
slug?: ReactNode;
|
|
52
51
|
/**
|
|
53
52
|
* Specify whether the Checkbox is currently invalid
|
|
54
53
|
*/
|
|
@@ -56,7 +55,7 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
56
55
|
/**
|
|
57
56
|
* Provide the text that is displayed when the Checkbox is in an invalid state
|
|
58
57
|
*/
|
|
59
|
-
warnText?:
|
|
58
|
+
warnText?: ReactNode;
|
|
60
59
|
/**
|
|
61
60
|
* Provide an optional handler that is called when the internal state of
|
|
62
61
|
* Checkbox changes. This handler is called with event and state info.
|
|
@@ -4,9 +4,8 @@
|
|
|
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
|
|
8
|
-
import {
|
|
9
|
-
import { type ComponentProps, type ReactNode, type ComponentType, type ReactElement, type RefAttributes, type PropsWithChildren, type PropsWithRef, type InputHTMLAttributes, type MouseEvent } from 'react';
|
|
7
|
+
import { UseComboboxProps } from 'downshift';
|
|
8
|
+
import { type ReactNode, type ComponentType, type ReactElement, type RefAttributes, type PropsWithChildren, type PropsWithRef, type InputHTMLAttributes, type MouseEvent } from 'react';
|
|
10
9
|
import { ListBoxSize } from '../ListBox';
|
|
11
10
|
type ExcludedAttributes = 'id' | 'onChange' | 'onClick' | 'type' | 'size';
|
|
12
11
|
interface OnChangeData<ItemType> {
|
|
@@ -45,7 +44,7 @@ export interface ComboBoxProps<ItemType> extends Omit<InputHTMLAttributes<HTMLIn
|
|
|
45
44
|
/**
|
|
46
45
|
* Additional props passed to Downshift
|
|
47
46
|
*/
|
|
48
|
-
downshiftProps?:
|
|
47
|
+
downshiftProps?: Partial<UseComboboxProps<ItemType>>;
|
|
49
48
|
/**
|
|
50
49
|
* Provide helper text that is used alongside the control label for
|
|
51
50
|
* additional help
|
|
@@ -139,7 +138,7 @@ export interface ComboBoxProps<ItemType> extends Omit<InputHTMLAttributes<HTMLIn
|
|
|
139
138
|
/**
|
|
140
139
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `ComboBox` component
|
|
141
140
|
*/
|
|
142
|
-
slug?:
|
|
141
|
+
slug?: ReactNode;
|
|
143
142
|
/**
|
|
144
143
|
* Provide text to be used in a `<label>` element that is tied to the
|
|
145
144
|
* combobox via ARIA attributes.
|