@carbon/react 1.57.0-rc.0 → 1.58.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 +1022 -1028
- package/es/components/Button/Button.js +2 -2
- 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 -260
- package/es/components/ComposedModal/ComposedModal.d.ts +1 -2
- package/es/components/ContainedList/ContainedList.d.ts +7 -3
- package/es/components/ContainedList/ContainedList.js +3 -2
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -2
- package/es/components/ContainedList/ContainedListItem/index.d.ts +9 -0
- package/es/components/ContainedList/index.d.ts +11 -0
- package/es/components/ContainedList/index.js +13 -0
- package/es/components/DataTable/TableHeader.d.ts +4 -5
- package/es/components/DataTable/TableSlugRow.d.ts +3 -2
- package/es/components/DataTable/stories/examples/TableToolbarFilter.d.ts +51 -0
- package/es/components/DatePicker/DatePicker.d.ts +9 -9
- package/es/components/DatePicker/plugins/rangePlugin.js +5 -6
- package/es/components/Dialog/index.d.ts +31 -0
- package/es/components/Dropdown/Dropdown.d.ts +5 -6
- package/es/components/IconButton/index.d.ts +3 -4
- package/es/components/ListBox/next/ListBoxTrigger.js +5 -3
- 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/MultiSelect/FilterableMultiSelect.d.ts +176 -0
- package/es/components/MultiSelect/FilterableMultiSelect.js +388 -313
- package/es/components/MultiSelect/MultiSelect.d.ts +10 -9
- package/es/components/MultiSelect/MultiSelect.js +1 -2
- package/es/components/MultiSelect/MultiSelectPropTypes.d.ts +62 -0
- package/es/components/MultiSelect/index.d.ts +10 -0
- package/es/components/MultiSelect/index.js +2 -0
- package/es/components/Notification/Notification.d.ts +2 -2
- package/es/components/NumberInput/NumberInput.d.ts +1 -2
- package/es/components/Pagination/Pagination.js +9 -9
- 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/RadioButton/RadioButton.d.ts +7 -4
- package/es/components/RadioButton/RadioButton.js +7 -1
- package/es/components/RadioButtonGroup/RadioButtonGroup.d.ts +11 -8
- package/es/components/RadioButtonGroup/RadioButtonGroup.js +7 -1
- 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/Tag/DismissibleTag.d.ts +3 -3
- package/es/components/Tag/OperationalTag.d.ts +3 -3
- package/es/components/Tag/SelectableTag.d.ts +3 -3
- package/es/components/Tag/Tag.d.ts +3 -3
- package/es/components/TextArea/TextArea.d.ts +6 -7
- 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/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/TimePicker/TimePicker.js +1 -1
- package/es/components/Toggle/Toggle.js +1 -1
- package/es/components/Tooltip/DefinitionTooltip.js +1 -1
- package/es/index.js +7 -5
- package/es/prop-types/deprecateValuesWithin.js +35 -0
- package/lib/components/Button/Button.js +2 -2
- 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 -260
- package/lib/components/ComposedModal/ComposedModal.d.ts +1 -2
- package/lib/components/ContainedList/ContainedList.d.ts +7 -3
- package/lib/components/ContainedList/ContainedList.js +3 -2
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +1 -2
- package/lib/components/ContainedList/ContainedListItem/index.d.ts +9 -0
- package/lib/components/ContainedList/index.d.ts +11 -0
- package/lib/components/ContainedList/index.js +19 -0
- package/lib/components/DataTable/TableHeader.d.ts +4 -5
- package/lib/components/DataTable/TableSlugRow.d.ts +3 -2
- package/lib/components/DataTable/stories/examples/TableToolbarFilter.d.ts +51 -0
- package/lib/components/DatePicker/DatePicker.d.ts +9 -9
- package/lib/components/DatePicker/plugins/rangePlugin.js +5 -6
- package/lib/components/Dialog/index.d.ts +31 -0
- package/lib/components/Dropdown/Dropdown.d.ts +5 -6
- package/lib/components/IconButton/index.d.ts +3 -4
- package/lib/components/ListBox/next/ListBoxTrigger.js +5 -3
- 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/MultiSelect/FilterableMultiSelect.d.ts +176 -0
- package/lib/components/MultiSelect/FilterableMultiSelect.js +387 -312
- package/lib/components/MultiSelect/MultiSelect.d.ts +10 -9
- package/lib/components/MultiSelect/MultiSelect.js +1 -2
- package/lib/components/MultiSelect/MultiSelectPropTypes.d.ts +62 -0
- package/lib/components/MultiSelect/index.d.ts +10 -0
- package/lib/components/MultiSelect/index.js +2 -0
- package/lib/components/Notification/Notification.d.ts +2 -2
- package/lib/components/NumberInput/NumberInput.d.ts +1 -2
- package/lib/components/Pagination/Pagination.js +9 -9
- 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/RadioButton/RadioButton.d.ts +7 -4
- package/lib/components/RadioButton/RadioButton.js +7 -1
- package/lib/components/RadioButtonGroup/RadioButtonGroup.d.ts +11 -8
- package/lib/components/RadioButtonGroup/RadioButtonGroup.js +7 -1
- 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/Tag/DismissibleTag.d.ts +3 -3
- package/lib/components/Tag/OperationalTag.d.ts +3 -3
- package/lib/components/Tag/SelectableTag.d.ts +3 -3
- package/lib/components/Tag/Tag.d.ts +3 -3
- package/lib/components/TextArea/TextArea.d.ts +6 -7
- 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/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/TimePicker/TimePicker.js +1 -1
- package/lib/components/Toggle/Toggle.js +1 -1
- package/lib/components/Tooltip/DefinitionTooltip.js +1 -1
- package/lib/index.js +34 -31
- package/lib/prop-types/deprecateValuesWithin.js +39 -0
- package/package.json +8 -8
- package/es/components/TileGroup/index.js +0 -13
- package/lib/components/TileGroup/index.js +0 -18
|
@@ -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
|
export interface TextAreaProps extends React.InputHTMLAttributes<HTMLTextAreaElement> {
|
|
10
9
|
/**
|
|
11
10
|
* Provide a custom className that is applied directly to the underlying
|
|
@@ -31,7 +30,7 @@ export interface TextAreaProps extends React.InputHTMLAttributes<HTMLTextAreaEle
|
|
|
31
30
|
/**
|
|
32
31
|
* Provide text that is used alongside the control label for additional help
|
|
33
32
|
*/
|
|
34
|
-
helperText?:
|
|
33
|
+
helperText?: ReactNode;
|
|
35
34
|
/**
|
|
36
35
|
* Specify whether you want the underlying label to be visually hidden
|
|
37
36
|
*/
|
|
@@ -47,12 +46,12 @@ export interface TextAreaProps extends React.InputHTMLAttributes<HTMLTextAreaEle
|
|
|
47
46
|
/**
|
|
48
47
|
* Provide the text that is displayed when the control is in an invalid state
|
|
49
48
|
*/
|
|
50
|
-
invalidText?:
|
|
49
|
+
invalidText?: ReactNode;
|
|
51
50
|
/**
|
|
52
51
|
* Provide the text that will be read by a screen reader when visiting this
|
|
53
52
|
* control
|
|
54
53
|
*/
|
|
55
|
-
labelText:
|
|
54
|
+
labelText: ReactNode;
|
|
56
55
|
/**
|
|
57
56
|
* @deprecated
|
|
58
57
|
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
@@ -93,7 +92,7 @@ export interface TextAreaProps extends React.InputHTMLAttributes<HTMLTextAreaEle
|
|
|
93
92
|
/**
|
|
94
93
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `TextArea` component
|
|
95
94
|
*/
|
|
96
|
-
slug?:
|
|
95
|
+
slug?: ReactNode;
|
|
97
96
|
/**
|
|
98
97
|
* Provide the current value of the `<textarea>`
|
|
99
98
|
*/
|
|
@@ -105,7 +104,7 @@ export interface TextAreaProps extends React.InputHTMLAttributes<HTMLTextAreaEle
|
|
|
105
104
|
/**
|
|
106
105
|
* Provide the text that is displayed when the control is in warning state
|
|
107
106
|
*/
|
|
108
|
-
warnText?:
|
|
107
|
+
warnText?: ReactNode;
|
|
109
108
|
/**
|
|
110
109
|
* Specify the method used for calculating the counter number
|
|
111
110
|
*/
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React, { InputHTMLAttributes } from 'react';
|
|
2
|
-
import { ReactNodeLike } from 'prop-types';
|
|
1
|
+
import React, { InputHTMLAttributes, ReactNode } from 'react';
|
|
3
2
|
type ExcludedAttributes = 'size';
|
|
4
3
|
export interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, ExcludedAttributes> {
|
|
5
4
|
/**
|
|
@@ -21,7 +20,7 @@ export interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
21
20
|
/**
|
|
22
21
|
* Provide text that is used alongside the control label for additional help
|
|
23
22
|
*/
|
|
24
|
-
helperText?:
|
|
23
|
+
helperText?: ReactNode;
|
|
25
24
|
/**
|
|
26
25
|
* Specify whether or not the underlying label is visually hidden
|
|
27
26
|
*/
|
|
@@ -45,11 +44,11 @@ export interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
45
44
|
/**
|
|
46
45
|
* Provide the text that is displayed when the control is in an invalid state
|
|
47
46
|
*/
|
|
48
|
-
invalidText?:
|
|
47
|
+
invalidText?: ReactNode;
|
|
49
48
|
/**
|
|
50
49
|
* Provide the text that will be read by a screen reader when visiting this control
|
|
51
50
|
*/
|
|
52
|
-
labelText:
|
|
51
|
+
labelText: ReactNode;
|
|
53
52
|
/**
|
|
54
53
|
* @deprecated The `light` prop for `PasswordInput` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release.
|
|
55
54
|
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
@@ -119,7 +118,7 @@ export interface PasswordInputProps extends Omit<InputHTMLAttributes<HTMLInputEl
|
|
|
119
118
|
/**
|
|
120
119
|
* Provide the text that is displayed when the control is in warning state
|
|
121
120
|
*/
|
|
122
|
-
warnText?:
|
|
121
|
+
warnText?: ReactNode;
|
|
123
122
|
}
|
|
124
123
|
declare const PasswordInput: React.ForwardRefExoticComponent<PasswordInputProps & React.RefAttributes<unknown>>;
|
|
125
124
|
export default PasswordInput;
|
|
@@ -149,10 +149,10 @@ const PasswordInput = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
149
149
|
align = tooltipPosition;
|
|
150
150
|
}
|
|
151
151
|
if (tooltipAlignment === 'end') {
|
|
152
|
-
align = `${tooltipPosition}-
|
|
152
|
+
align = `${tooltipPosition}-end`;
|
|
153
153
|
}
|
|
154
154
|
if (tooltipAlignment === 'start') {
|
|
155
|
-
align = `${tooltipPosition}-
|
|
155
|
+
align = `${tooltipPosition}-start`;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
158
|
if (tooltipPosition === 'right' || tooltipPosition === 'left') {
|
|
@@ -4,7 +4,6 @@
|
|
|
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 { ReactNodeLike } from 'prop-types';
|
|
8
7
|
import React, { ReactNode } from 'react';
|
|
9
8
|
type ExcludedAttributes = 'defaultValue' | 'id' | 'size' | 'value';
|
|
10
9
|
export interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, ExcludedAttributes> {
|
|
@@ -89,7 +88,7 @@ export interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInput
|
|
|
89
88
|
/**
|
|
90
89
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `TextInput` component
|
|
91
90
|
*/
|
|
92
|
-
slug?:
|
|
91
|
+
slug?: ReactNode;
|
|
93
92
|
/**
|
|
94
93
|
* Specify the type of the `<input>`
|
|
95
94
|
*/
|
|
@@ -15,6 +15,7 @@ var PropTypes = require('prop-types');
|
|
|
15
15
|
var React = require('react');
|
|
16
16
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
17
|
var LayerContext = require('../Layer/LayerContext.js');
|
|
18
|
+
var useMatchMedia = require('../../internal/useMatchMedia.js');
|
|
18
19
|
|
|
19
20
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
21
|
|
|
@@ -72,8 +73,10 @@ function Theme(_ref2) {
|
|
|
72
73
|
[`${prefix}--layer-one`]: true
|
|
73
74
|
});
|
|
74
75
|
const value = React__default["default"].useMemo(() => {
|
|
76
|
+
const isDark = theme && ['g90', 'g100'].includes(theme);
|
|
75
77
|
return {
|
|
76
|
-
theme
|
|
78
|
+
theme,
|
|
79
|
+
isDark
|
|
77
80
|
};
|
|
78
81
|
}, [theme]);
|
|
79
82
|
const BaseComponentAsAny = BaseComponent;
|
|
@@ -112,8 +115,12 @@ Theme.propTypes = {
|
|
|
112
115
|
function useTheme() {
|
|
113
116
|
return React__default["default"].useContext(ThemeContext);
|
|
114
117
|
}
|
|
118
|
+
function usePrefersDarkScheme() {
|
|
119
|
+
return useMatchMedia.useMatchMedia('(prefers-color-scheme: dark)');
|
|
120
|
+
}
|
|
115
121
|
|
|
116
122
|
exports.GlobalTheme = GlobalTheme;
|
|
117
123
|
exports.Theme = Theme;
|
|
118
124
|
exports.ThemeContext = ThemeContext;
|
|
125
|
+
exports.usePrefersDarkScheme = usePrefersDarkScheme;
|
|
119
126
|
exports.useTheme = useTheme;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import React, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ChangeEvent, type ComponentType } from 'react';
|
|
2
|
-
import { ReactNodeLike } from 'prop-types';
|
|
3
2
|
export interface TileProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
children?: ReactNode;
|
|
5
4
|
className?: string;
|
|
@@ -13,7 +12,7 @@ export interface TileProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
12
|
/**
|
|
14
13
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `SelectableTile` component
|
|
15
14
|
*/
|
|
16
|
-
slug?:
|
|
15
|
+
slug?: ReactNode;
|
|
17
16
|
}
|
|
18
17
|
export declare const Tile: React.ForwardRefExoticComponent<TileProps & React.RefAttributes<HTMLDivElement>>;
|
|
19
18
|
export interface ClickableTileProps extends HTMLAttributes<HTMLAnchorElement> {
|
|
@@ -104,7 +103,7 @@ export interface SelectableTileProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
104
103
|
/**
|
|
105
104
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `SelectableTile` component
|
|
106
105
|
*/
|
|
107
|
-
slug?:
|
|
106
|
+
slug?: ReactNode;
|
|
108
107
|
/**
|
|
109
108
|
* Specify the tab index of the wrapper element
|
|
110
109
|
*/
|
|
@@ -149,7 +148,7 @@ export interface ExpandableTileProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
149
148
|
/**
|
|
150
149
|
* **Experimental**: Provide a `Slug` component to be rendered inside the `ExpandableTile` component
|
|
151
150
|
*/
|
|
152
|
-
slug?:
|
|
151
|
+
slug?: ReactNode;
|
|
153
152
|
/**
|
|
154
153
|
* The `tabindex` attribute.
|
|
155
154
|
*/
|
|
@@ -4,14 +4,15 @@
|
|
|
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 PropTypes
|
|
7
|
+
import PropTypes from 'prop-types';
|
|
8
|
+
import { ReactNode } from 'react';
|
|
8
9
|
import { ReactAttr } from '../../types/common';
|
|
9
10
|
type ExcludedAttributes = 'onChange';
|
|
10
11
|
export interface TileGroupProps extends Omit<ReactAttr<HTMLFieldSetElement>, ExcludedAttributes> {
|
|
11
12
|
/**
|
|
12
13
|
* Provide a collection of <RadioTile> components to render in the group
|
|
13
14
|
*/
|
|
14
|
-
children?:
|
|
15
|
+
children?: ReactNode;
|
|
15
16
|
/**
|
|
16
17
|
* Provide an optional className to be applied to the container node
|
|
17
18
|
*/
|
|
@@ -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 TileGroup from './TileGroup';
|
|
8
|
+
export default TileGroup;
|
|
9
|
+
export { TileGroup };
|
|
@@ -123,7 +123,7 @@ const TimePicker = /*#__PURE__*/React__default["default"].forwardRef(function Ti
|
|
|
123
123
|
if (item) {
|
|
124
124
|
return /*#__PURE__*/React__default["default"].cloneElement(item, {
|
|
125
125
|
...item.props,
|
|
126
|
-
disabled: disabled,
|
|
126
|
+
disabled: item.props.disabled ?? disabled,
|
|
127
127
|
readOnly: readOnly,
|
|
128
128
|
...readOnlyEventHandlers
|
|
129
129
|
});
|
|
@@ -99,7 +99,7 @@ function Toggle(_ref) {
|
|
|
99
99
|
role: "switch",
|
|
100
100
|
type: "button",
|
|
101
101
|
"aria-checked": checked,
|
|
102
|
-
"aria-labelledby": ariaLabelledby ?? labelId,
|
|
102
|
+
"aria-labelledby": ariaLabelledby ?? (labelText ? labelId : undefined),
|
|
103
103
|
disabled: disabled,
|
|
104
104
|
onClick: handleClick
|
|
105
105
|
})), /*#__PURE__*/React__default["default"].createElement(LabelComponent, {
|
package/lib/index.js
CHANGED
|
@@ -30,6 +30,7 @@ var index$5 = require('./components/ComboButton/index.js');
|
|
|
30
30
|
var ComposedModal = require('./components/ComposedModal/ComposedModal.js');
|
|
31
31
|
var ModalHeader = require('./components/ComposedModal/ModalHeader.js');
|
|
32
32
|
var ModalFooter = require('./components/ComposedModal/ModalFooter.js');
|
|
33
|
+
require('./components/ContainedList/index.js');
|
|
33
34
|
var index$6 = require('./components/ContentSwitcher/index.js');
|
|
34
35
|
var Copy = require('./components/Copy/Copy.js');
|
|
35
36
|
var CopyButton = require('./components/CopyButton/CopyButton.js');
|
|
@@ -73,6 +74,7 @@ var MenuItem = require('./components/Menu/MenuItem.js');
|
|
|
73
74
|
var index$8 = require('./components/MenuButton/index.js');
|
|
74
75
|
var Modal = require('./components/Modal/Modal.js');
|
|
75
76
|
var ModalWrapper = require('./components/ModalWrapper/ModalWrapper.js');
|
|
77
|
+
require('./components/MultiSelect/index.js');
|
|
76
78
|
var Notification = require('./components/Notification/Notification.js');
|
|
77
79
|
var NumberInput_Skeleton = require('./components/NumberInput/NumberInput.Skeleton.js');
|
|
78
80
|
var NumberInput = require('./components/NumberInput/NumberInput.js');
|
|
@@ -82,6 +84,8 @@ var OverflowMenuItem = require('./components/OverflowMenuItem/OverflowMenuItem.j
|
|
|
82
84
|
var Pagination$1 = require('./components/Pagination/Pagination.js');
|
|
83
85
|
var Pagination_Skeleton = require('./components/Pagination/Pagination.Skeleton.js');
|
|
84
86
|
var PaginationNav = require('./components/PaginationNav/PaginationNav.js');
|
|
87
|
+
var ControlledPasswordInput = require('./components/TextInput/ControlledPasswordInput.js');
|
|
88
|
+
var PasswordInput = require('./components/TextInput/PasswordInput.js');
|
|
85
89
|
var PrimaryButton = require('./components/PrimaryButton/PrimaryButton.js');
|
|
86
90
|
var ProgressIndicator_Skeleton = require('./components/ProgressIndicator/ProgressIndicator.Skeleton.js');
|
|
87
91
|
var ProgressIndicator = require('./components/ProgressIndicator/ProgressIndicator.js');
|
|
@@ -119,13 +123,13 @@ var TextArea = require('./components/TextArea/TextArea.js');
|
|
|
119
123
|
var TextArea_Skeleton = require('./components/TextArea/TextArea.Skeleton.js');
|
|
120
124
|
require('./components/TextInput/index.js');
|
|
121
125
|
var Tile = require('./components/Tile/Tile.js');
|
|
122
|
-
var
|
|
126
|
+
var TileGroup = require('./components/TileGroup/TileGroup.js');
|
|
123
127
|
var TimePicker = require('./components/TimePicker/TimePicker.js');
|
|
124
128
|
var TimePickerSelect = require('./components/TimePickerSelect/TimePickerSelect.js');
|
|
125
129
|
var Toggle = require('./components/Toggle/Toggle.js');
|
|
126
130
|
var Toggle_Skeleton = require('./components/Toggle/Toggle.Skeleton.js');
|
|
127
131
|
var ToggleSmall_Skeleton = require('./components/ToggleSmall/ToggleSmall.Skeleton.js');
|
|
128
|
-
var index$
|
|
132
|
+
var index$b = require('./components/Toggletip/index.js');
|
|
129
133
|
var Content = require('./components/UIShell/Content.js');
|
|
130
134
|
var Header = require('./components/UIShell/Header.js');
|
|
131
135
|
var HeaderContainer = require('./components/UIShell/HeaderContainer.js');
|
|
@@ -157,12 +161,12 @@ var SideNavMenuItem = require('./components/UIShell/SideNavMenuItem.js');
|
|
|
157
161
|
var SideNavSwitcher = require('./components/UIShell/SideNavSwitcher.js');
|
|
158
162
|
var UnorderedList = require('./components/UnorderedList/UnorderedList.js');
|
|
159
163
|
var index = require('./components/FeatureFlags/index.js');
|
|
160
|
-
var index$
|
|
161
|
-
var index$
|
|
162
|
-
var index$
|
|
164
|
+
var index$c = require('./components/Heading/index.js');
|
|
165
|
+
var index$d = require('./components/IconButton/index.js');
|
|
166
|
+
var index$e = require('./components/Layer/index.js');
|
|
163
167
|
var index$1 = require('./components/Layout/index.js');
|
|
164
168
|
var index$2 = require('./components/OverflowMenuV2/index.js');
|
|
165
|
-
var index$
|
|
169
|
+
var index$f = require('./components/Popover/index.js');
|
|
166
170
|
var ProgressBar = require('./components/ProgressBar/ProgressBar.js');
|
|
167
171
|
var index$3 = require('./components/Slug/index.js');
|
|
168
172
|
var AiSkeletonPlaceholder = require('./components/AiSkeleton/AiSkeletonPlaceholder.js');
|
|
@@ -171,7 +175,7 @@ var AiSkeletonText = require('./components/AiSkeleton/AiSkeletonText.js');
|
|
|
171
175
|
var DefinitionTooltip = require('./components/Tooltip/DefinitionTooltip.js');
|
|
172
176
|
var Tooltip = require('./components/Tooltip/Tooltip.js');
|
|
173
177
|
require('./components/Text/index.js');
|
|
174
|
-
var index$
|
|
178
|
+
var index$g = require('./components/Theme/index.js');
|
|
175
179
|
var usePrefix = require('./internal/usePrefix.js');
|
|
176
180
|
var useIdPrefix = require('./internal/useIdPrefix.js');
|
|
177
181
|
var FluidDatePicker_Skeleton = require('./components/FluidDatePicker/FluidDatePicker.Skeleton.js');
|
|
@@ -183,6 +187,7 @@ var PageSelector = require('./components/Pagination/experimental/PageSelector.js
|
|
|
183
187
|
var Pagination = require('./components/Pagination/experimental/Pagination.js');
|
|
184
188
|
var CheckboxGroup = require('./components/CheckboxGroup/CheckboxGroup.js');
|
|
185
189
|
var ContainedListItem = require('./components/ContainedList/ContainedListItem/ContainedListItem.js');
|
|
190
|
+
var ContainedList = require('./components/ContainedList/ContainedList.js');
|
|
186
191
|
var useContextMenu = require('./components/ContextMenu/useContextMenu.js');
|
|
187
192
|
var Slider_Skeleton = require('./components/Slider/Slider.Skeleton.js');
|
|
188
193
|
var TextInput_Skeleton = require('./components/TextInput/TextInput.Skeleton.js');
|
|
@@ -207,7 +212,6 @@ var ChatButton = require('./components/ChatButton/ChatButton.js');
|
|
|
207
212
|
var ChatButton_Skeleton = require('./components/ChatButton/ChatButton.Skeleton.js');
|
|
208
213
|
var Text = require('./components/Text/Text.js');
|
|
209
214
|
var TextDirection = require('./components/Text/TextDirection.js');
|
|
210
|
-
var ContainedList = require('./components/ContainedList/ContainedList.js');
|
|
211
215
|
var DataTable = require('./components/DataTable/DataTable.js');
|
|
212
216
|
var Table = require('./components/DataTable/Table.js');
|
|
213
217
|
var TableActionList = require('./components/DataTable/TableActionList.js');
|
|
@@ -232,8 +236,6 @@ var TableToolbarSearch = require('./components/DataTable/TableToolbarSearch.js')
|
|
|
232
236
|
var TableToolbarMenu = require('./components/DataTable/TableToolbarMenu.js');
|
|
233
237
|
var FilterableMultiSelect = require('./components/MultiSelect/FilterableMultiSelect.js');
|
|
234
238
|
var MultiSelect = require('./components/MultiSelect/MultiSelect.js');
|
|
235
|
-
var ControlledPasswordInput = require('./components/TextInput/ControlledPasswordInput.js');
|
|
236
|
-
var PasswordInput = require('./components/TextInput/PasswordInput.js');
|
|
237
239
|
var TreeNode = require('./components/TreeView/TreeNode.js');
|
|
238
240
|
|
|
239
241
|
|
|
@@ -323,6 +325,8 @@ exports.OverflowMenuItem = OverflowMenuItem["default"];
|
|
|
323
325
|
exports.Pagination = Pagination$1["default"];
|
|
324
326
|
exports.PaginationSkeleton = Pagination_Skeleton["default"];
|
|
325
327
|
exports.PaginationNav = PaginationNav["default"];
|
|
328
|
+
exports.ControlledPasswordInput = ControlledPasswordInput["default"];
|
|
329
|
+
exports.PasswordInput = PasswordInput["default"];
|
|
326
330
|
exports.PrimaryButton = PrimaryButton["default"];
|
|
327
331
|
exports.ProgressIndicatorSkeleton = ProgressIndicator_Skeleton["default"];
|
|
328
332
|
exports.ProgressIndicator = ProgressIndicator.ProgressIndicator;
|
|
@@ -375,17 +379,17 @@ exports.SelectableTile = Tile.SelectableTile;
|
|
|
375
379
|
exports.Tile = Tile.Tile;
|
|
376
380
|
exports.TileAboveTheFoldContent = Tile.TileAboveTheFoldContent;
|
|
377
381
|
exports.TileBelowTheFoldContent = Tile.TileBelowTheFoldContent;
|
|
378
|
-
exports.TileGroup =
|
|
382
|
+
exports.TileGroup = TileGroup["default"];
|
|
379
383
|
exports.TimePicker = TimePicker["default"];
|
|
380
384
|
exports.TimePickerSelect = TimePickerSelect["default"];
|
|
381
385
|
exports.Toggle = Toggle.Toggle;
|
|
382
386
|
exports.ToggleSkeleton = Toggle_Skeleton["default"];
|
|
383
387
|
exports.ToggleSmallSkeleton = ToggleSmall_Skeleton["default"];
|
|
384
|
-
exports.Toggletip = index$
|
|
385
|
-
exports.ToggletipActions = index$
|
|
386
|
-
exports.ToggletipButton = index$
|
|
387
|
-
exports.ToggletipContent = index$
|
|
388
|
-
exports.ToggletipLabel = index$
|
|
388
|
+
exports.Toggletip = index$b.Toggletip;
|
|
389
|
+
exports.ToggletipActions = index$b.ToggletipActions;
|
|
390
|
+
exports.ToggletipButton = index$b.ToggletipButton;
|
|
391
|
+
exports.ToggletipContent = index$b.ToggletipContent;
|
|
392
|
+
exports.ToggletipLabel = index$b.ToggletipLabel;
|
|
389
393
|
exports.Content = Content["default"];
|
|
390
394
|
exports.Header = Header["default"];
|
|
391
395
|
exports.HeaderContainer = HeaderContainer["default"];
|
|
@@ -419,16 +423,16 @@ exports.UnorderedList = UnorderedList["default"];
|
|
|
419
423
|
exports.unstable_FeatureFlags = index.FeatureFlags;
|
|
420
424
|
exports.unstable_useFeatureFlag = index.useFeatureFlag;
|
|
421
425
|
exports.unstable_useFeatureFlags = index.useFeatureFlags;
|
|
422
|
-
exports.Heading = index$
|
|
423
|
-
exports.Section = index$
|
|
424
|
-
exports.IconButton = index$
|
|
425
|
-
exports.IconButtonKinds = index$
|
|
426
|
-
exports.Layer = index$
|
|
427
|
-
exports.useLayer = index$
|
|
426
|
+
exports.Heading = index$c.Heading;
|
|
427
|
+
exports.Section = index$c.Section;
|
|
428
|
+
exports.IconButton = index$d.IconButton;
|
|
429
|
+
exports.IconButtonKinds = index$d.IconButtonKinds;
|
|
430
|
+
exports.Layer = index$e.Layer;
|
|
431
|
+
exports.useLayer = index$e.useLayer;
|
|
428
432
|
exports.unstable_Layout = index$1.Layout;
|
|
429
433
|
exports.unstable_OverflowMenuV2 = index$2.OverflowMenuV2;
|
|
430
|
-
exports.Popover = index$
|
|
431
|
-
exports.PopoverContent = index$
|
|
434
|
+
exports.Popover = index$f.Popover;
|
|
435
|
+
exports.PopoverContent = index$f.PopoverContent;
|
|
432
436
|
exports.ProgressBar = ProgressBar["default"];
|
|
433
437
|
exports.unstable__Slug = index$3.Slug;
|
|
434
438
|
exports.unstable__SlugActions = index$3.SlugActions;
|
|
@@ -438,10 +442,11 @@ exports.unstable__AiSkeletonIcon = AiSkeletonIcon["default"];
|
|
|
438
442
|
exports.unstable__AiSkeletonText = AiSkeletonText["default"];
|
|
439
443
|
exports.DefinitionTooltip = DefinitionTooltip.DefinitionTooltip;
|
|
440
444
|
exports.Tooltip = Tooltip.Tooltip;
|
|
441
|
-
exports.GlobalTheme = index$
|
|
442
|
-
exports.Theme = index$
|
|
443
|
-
exports.ThemeContext = index$
|
|
444
|
-
exports.
|
|
445
|
+
exports.GlobalTheme = index$g.GlobalTheme;
|
|
446
|
+
exports.Theme = index$g.Theme;
|
|
447
|
+
exports.ThemeContext = index$g.ThemeContext;
|
|
448
|
+
exports.usePrefersDarkScheme = index$g.usePrefersDarkScheme;
|
|
449
|
+
exports.useTheme = index$g.useTheme;
|
|
445
450
|
exports.PrefixContext = usePrefix.PrefixContext;
|
|
446
451
|
exports.usePrefix = usePrefix.usePrefix;
|
|
447
452
|
exports.useIdPrefix = useIdPrefix.useIdPrefix;
|
|
@@ -454,6 +459,7 @@ exports.unstable_PageSelector = PageSelector["default"];
|
|
|
454
459
|
exports.unstable_Pagination = Pagination["default"];
|
|
455
460
|
exports.CheckboxGroup = CheckboxGroup["default"];
|
|
456
461
|
exports.ContainedListItem = ContainedListItem["default"];
|
|
462
|
+
exports.ContainedList = ContainedList["default"];
|
|
457
463
|
exports.useContextMenu = useContextMenu["default"];
|
|
458
464
|
exports.SliderSkeleton = Slider_Skeleton["default"];
|
|
459
465
|
exports.TextInputSkeleton = TextInput_Skeleton["default"];
|
|
@@ -478,7 +484,6 @@ exports.unstable__ChatButton = ChatButton["default"];
|
|
|
478
484
|
exports.unstable__ChatButtonSkeleton = ChatButton_Skeleton["default"];
|
|
479
485
|
exports.unstable_Text = Text.Text;
|
|
480
486
|
exports.unstable_TextDirection = TextDirection.TextDirection;
|
|
481
|
-
exports.ContainedList = ContainedList["default"];
|
|
482
487
|
exports.DataTable = DataTable["default"];
|
|
483
488
|
exports.Table = Table.Table;
|
|
484
489
|
exports.TableActionList = TableActionList["default"];
|
|
@@ -503,6 +508,4 @@ exports.TableToolbarSearch = TableToolbarSearch["default"];
|
|
|
503
508
|
exports.TableToolbarMenu = TableToolbarMenu["default"];
|
|
504
509
|
exports.FilterableMultiSelect = FilterableMultiSelect["default"];
|
|
505
510
|
exports.MultiSelect = MultiSelect["default"];
|
|
506
|
-
exports.ControlledPasswordInput = ControlledPasswordInput["default"];
|
|
507
|
-
exports.PasswordInput = PasswordInput["default"];
|
|
508
511
|
exports.TreeNode = TreeNode["default"];
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
+
|
|
12
|
+
var warning = require('../internal/warning.js');
|
|
13
|
+
|
|
14
|
+
const didWarnAboutDeprecation = {};
|
|
15
|
+
function deprecateValuesWithin(propType, allowedValues, propMappingFunction) {
|
|
16
|
+
return function checker(props, propName, componentName) {
|
|
17
|
+
if (props[propName] === undefined) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (!didWarnAboutDeprecation[componentName] || !didWarnAboutDeprecation[componentName][propName]) {
|
|
21
|
+
didWarnAboutDeprecation[componentName] = {
|
|
22
|
+
...didWarnAboutDeprecation[componentName],
|
|
23
|
+
[propName]: true
|
|
24
|
+
};
|
|
25
|
+
const deprecatedValue = props[propName];
|
|
26
|
+
const newValue = propMappingFunction ? propMappingFunction(deprecatedValue) : null;
|
|
27
|
+
if (allowedValues && !allowedValues.includes(deprecatedValue)) {
|
|
28
|
+
const message = propMappingFunction ? `"${deprecatedValue}" is a deprecated value for the "${propName}" prop on the "${componentName}" component. Use "${newValue}" instead. "${deprecatedValue}" will be removed in the next major release.` : `"${deprecatedValue}" is a deprecated value for the "${propName}" prop on the "${componentName}" component. Allowed values is/are: ${allowedValues.join(', ')}. "${deprecatedValue}" will be removed in the next major release. `;
|
|
29
|
+
process.env.NODE_ENV !== "production" ? warning.warning(false, message) : void 0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
for (var _len = arguments.length, rest = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
|
|
33
|
+
rest[_key - 3] = arguments[_key];
|
|
34
|
+
}
|
|
35
|
+
return propType(props, propName, componentName, ...rest);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
exports["default"] = deprecateValuesWithin;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.58.0-rc.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@babel/runtime": "^7.18.3",
|
|
51
|
-
"@carbon/feature-flags": "^0.20.0
|
|
52
|
-
"@carbon/icons-react": "^11.
|
|
53
|
-
"@carbon/layout": "^11.22.0
|
|
54
|
-
"@carbon/styles": "^1.
|
|
51
|
+
"@carbon/feature-flags": "^0.20.0",
|
|
52
|
+
"@carbon/icons-react": "^11.42.0-rc.0",
|
|
53
|
+
"@carbon/layout": "^11.22.0",
|
|
54
|
+
"@carbon/styles": "^1.58.0-rc.0",
|
|
55
55
|
"@floating-ui/react": "^0.26.0",
|
|
56
56
|
"@ibm/telemetry-js": "^1.5.0",
|
|
57
57
|
"classnames": "2.5.1",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"@babel/preset-react": "^7.22.3",
|
|
82
82
|
"@babel/preset-typescript": "^7.21.5",
|
|
83
83
|
"@carbon/test-utils": "^10.30.0",
|
|
84
|
-
"@carbon/themes": "^11.35.0
|
|
84
|
+
"@carbon/themes": "^11.35.0",
|
|
85
85
|
"@rollup/plugin-babel": "^6.0.0",
|
|
86
86
|
"@rollup/plugin-commonjs": "^25.0.0",
|
|
87
87
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
"sass": "^1.51.0",
|
|
124
124
|
"sass-loader": "^14.0.0",
|
|
125
125
|
"storybook": "^7.1.0",
|
|
126
|
-
"storybook-addon-accessibility-checker": "^3.1.61-rc.
|
|
126
|
+
"storybook-addon-accessibility-checker": "^3.1.61-rc.3",
|
|
127
127
|
"stream-browserify": "^3.0.0",
|
|
128
128
|
"style-loader": "^3.3.1",
|
|
129
129
|
"typescript-config-carbon": "^0.2.0",
|
|
@@ -141,5 +141,5 @@
|
|
|
141
141
|
"**/*.scss",
|
|
142
142
|
"**/*.css"
|
|
143
143
|
],
|
|
144
|
-
"gitHead": "
|
|
144
|
+
"gitHead": "23f19271f964a10a9fbc4616a43b05f5cc14e7d1"
|
|
145
145
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
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
|
-
|
|
8
|
-
import { createClassWrapper } from '../../internal/createClassWrapper.js';
|
|
9
|
-
import TileGroup$1 from './TileGroup.js';
|
|
10
|
-
|
|
11
|
-
const TileGroup = createClassWrapper(TileGroup$1);
|
|
12
|
-
|
|
13
|
-
export { TileGroup, TileGroup as default };
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
|
|
8
|
-
'use strict';
|
|
9
|
-
|
|
10
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
|
-
|
|
12
|
-
var createClassWrapper = require('../../internal/createClassWrapper.js');
|
|
13
|
-
var TileGroup$1 = require('./TileGroup.js');
|
|
14
|
-
|
|
15
|
-
const TileGroup = createClassWrapper.createClassWrapper(TileGroup$1["default"]);
|
|
16
|
-
|
|
17
|
-
exports.TileGroup = TileGroup;
|
|
18
|
-
exports["default"] = TileGroup;
|