@carbon/react 1.66.0-rc.0 → 1.66.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 +822 -898
- package/es/components/AILabel/index.d.ts +37 -0
- package/es/components/AILabel/index.js +38 -14
- package/es/components/Accordion/Accordion.d.ts +5 -1
- package/es/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/es/components/Button/Button.d.ts +2 -1
- package/es/components/Button/Button.js +14 -3
- package/es/components/CodeSnippet/CodeSnippet.d.ts +9 -1
- package/es/components/CodeSnippet/CodeSnippet.js +7 -0
- package/es/components/ComboBox/ComboBox.js +26 -12
- package/es/components/Copy/Copy.d.ts +9 -1
- package/es/components/Copy/Copy.js +6 -0
- package/es/components/CopyButton/CopyButton.d.ts +9 -1
- package/es/components/CopyButton/CopyButton.js +6 -0
- package/es/components/Dropdown/Dropdown.js +1 -1
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +20 -0
- package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +3 -20
- package/es/components/FluidTextArea/FluidTextArea.d.ts +96 -0
- package/es/components/FluidTextArea/FluidTextArea.js +2 -2
- package/es/components/FluidTextArea/index.d.ts +12 -0
- package/es/components/IconButton/index.d.ts +4 -0
- package/es/components/IconButton/index.js +6 -0
- package/es/components/Menu/Menu.js +2 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +2 -1
- package/es/components/MultiSelect/MultiSelect.js +1 -0
- package/es/components/OverflowMenu/next/index.js +3 -1
- package/es/components/Popover/index.js +1 -1
- package/es/components/Tag/DismissibleTag.d.ts +9 -1
- package/es/components/Tag/DismissibleTag.js +7 -3
- package/es/components/Tag/Tag.js +2 -2
- package/es/components/Toggletip/index.js +2 -1
- package/es/index.js +2 -2
- package/lib/components/AILabel/index.d.ts +37 -0
- package/lib/components/AILabel/index.js +38 -14
- package/lib/components/Accordion/Accordion.d.ts +5 -1
- package/lib/components/Breadcrumb/BreadcrumbItem.js +1 -1
- package/lib/components/Button/Button.d.ts +2 -1
- package/lib/components/Button/Button.js +13 -2
- package/lib/components/CodeSnippet/CodeSnippet.d.ts +9 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +7 -0
- package/lib/components/ComboBox/ComboBox.js +26 -12
- package/lib/components/Copy/Copy.d.ts +9 -1
- package/lib/components/Copy/Copy.js +6 -0
- package/lib/components/CopyButton/CopyButton.d.ts +9 -1
- package/lib/components/CopyButton/CopyButton.js +6 -0
- package/lib/components/Dropdown/Dropdown.js +1 -1
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +20 -0
- package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +3 -22
- package/lib/components/FluidTextArea/FluidTextArea.d.ts +96 -0
- package/lib/components/FluidTextArea/FluidTextArea.js +2 -2
- package/lib/components/FluidTextArea/index.d.ts +12 -0
- package/lib/components/IconButton/index.d.ts +4 -0
- package/lib/components/IconButton/index.js +6 -0
- package/lib/components/Menu/Menu.js +2 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +2 -1
- package/lib/components/MultiSelect/MultiSelect.js +1 -0
- package/lib/components/OverflowMenu/next/index.js +3 -1
- package/lib/components/Popover/index.js +1 -1
- package/lib/components/Tag/DismissibleTag.d.ts +9 -1
- package/lib/components/Tag/DismissibleTag.js +7 -3
- package/lib/components/Tag/Tag.js +2 -2
- package/lib/components/Toggletip/index.js +2 -1
- package/lib/index.js +4 -4
- package/package.json +9 -9
|
@@ -195,7 +195,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
195
195
|
[`${prefix}--dropdown--readonly`]: readOnly,
|
|
196
196
|
[`${prefix}--dropdown--${size}`]: size,
|
|
197
197
|
[`${prefix}--list-box--up`]: direction === 'top',
|
|
198
|
-
[`${prefix}--
|
|
198
|
+
[`${prefix}--autoalign`]: autoAlign
|
|
199
199
|
});
|
|
200
200
|
const titleClasses = cx__default["default"](`${prefix}--label`, {
|
|
201
201
|
[`${prefix}--label--disabled`]: disabled,
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
export interface FluidTextAreaSkeletonProps {
|
|
3
|
+
/**
|
|
4
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
5
|
+
*/
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function FluidTextAreaSkeleton({ className, ...other }: {
|
|
9
|
+
[x: string]: any;
|
|
10
|
+
className: any;
|
|
11
|
+
}): void;
|
|
12
|
+
declare namespace FluidTextAreaSkeleton {
|
|
13
|
+
var propTypes: {
|
|
14
|
+
/**
|
|
15
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
16
|
+
*/
|
|
17
|
+
className: PropTypes.Requireable<string>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export default FluidTextAreaSkeleton;
|
|
@@ -9,36 +9,17 @@
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
|
-
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
|
13
12
|
var PropTypes = require('prop-types');
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
require('react');
|
|
14
|
+
require('classnames');
|
|
16
15
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
17
|
-
var FormContext = require('../FluidForm/FormContext.js');
|
|
18
16
|
|
|
19
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
20
18
|
|
|
21
19
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
22
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
|
-
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
24
20
|
|
|
25
21
|
function FluidTextAreaSkeleton(_ref) {
|
|
26
|
-
|
|
27
|
-
className,
|
|
28
|
-
...other
|
|
29
|
-
} = _ref;
|
|
30
|
-
const prefix = usePrefix.usePrefix();
|
|
31
|
-
return /*#__PURE__*/React__default["default"].createElement(FormContext.FormContext.Provider, {
|
|
32
|
-
value: {
|
|
33
|
-
isFluid: true
|
|
34
|
-
}
|
|
35
|
-
}, /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
|
|
36
|
-
className: cx__default["default"](`${prefix}--form-item ${prefix}--text-area--fluid__skeleton`, className)
|
|
37
|
-
}, other), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
38
|
-
className: `${prefix}--label ${prefix}--skeleton`
|
|
39
|
-
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40
|
-
className: `${prefix}--skeleton ${prefix}--text-area`
|
|
41
|
-
})));
|
|
22
|
+
usePrefix.usePrefix();
|
|
42
23
|
}
|
|
43
24
|
FluidTextAreaSkeleton.propTypes = {
|
|
44
25
|
/**
|
|
@@ -0,0 +1,96 @@
|
|
|
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 interface FluidTextAreaProps {
|
|
9
|
+
/**
|
|
10
|
+
* Provide a custom className that is applied directly to the underlying
|
|
11
|
+
* `<textarea>` node
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the `cols` attribute for the underlying `<textarea>` node
|
|
16
|
+
*/
|
|
17
|
+
cols?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Optionally provide the default value of the `<textarea>`
|
|
20
|
+
*/
|
|
21
|
+
defaultValue?: string | number;
|
|
22
|
+
/**
|
|
23
|
+
* Specify whether the control is disabled
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Specify whether to display the character counter
|
|
28
|
+
*/
|
|
29
|
+
enableCounter?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Provide text that is used alongside the control label for additional help
|
|
32
|
+
*/
|
|
33
|
+
helperText?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Specify whether you want the underlying label to be visually hidden
|
|
36
|
+
*/
|
|
37
|
+
hideLabel?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Provide a unique identifier for the control
|
|
40
|
+
*/
|
|
41
|
+
id?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Specify whether the control is currently invalid
|
|
44
|
+
*/
|
|
45
|
+
invalid?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Provide the text that is displayed when the control is in an invalid state
|
|
48
|
+
*/
|
|
49
|
+
invalidText?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Provide the text that will be read by a screen reader when visiting this
|
|
52
|
+
* control
|
|
53
|
+
*/
|
|
54
|
+
labelText: React.ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
57
|
+
* Don't use this to make tile background color same as container background color.
|
|
58
|
+
*/
|
|
59
|
+
light?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Max character count allowed for the textarea. This is needed in order for enableCounter to display
|
|
62
|
+
*/
|
|
63
|
+
maxCount?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Optionally provide an `onChange` handler that is called whenever `<textarea>`
|
|
66
|
+
* is updated
|
|
67
|
+
*/
|
|
68
|
+
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
69
|
+
/**
|
|
70
|
+
* Optionally provide an `onClick` handler that is called whenever the
|
|
71
|
+
* `<textarea>` is clicked
|
|
72
|
+
*/
|
|
73
|
+
onClick?: React.MouseEventHandler<HTMLTextAreaElement>;
|
|
74
|
+
/**
|
|
75
|
+
* Specify the placeholder attribute for the `<textarea>`
|
|
76
|
+
*/
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Specify the rows attribute for the `<textarea>`
|
|
80
|
+
*/
|
|
81
|
+
rows?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Provide the current value of the `<textarea>`
|
|
84
|
+
*/
|
|
85
|
+
value?: string | number;
|
|
86
|
+
/**
|
|
87
|
+
* Specify whether the control is currently in warning state
|
|
88
|
+
*/
|
|
89
|
+
warn?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Provide the text that is displayed when the control is in warning state
|
|
92
|
+
*/
|
|
93
|
+
warnText?: React.ReactNode;
|
|
94
|
+
}
|
|
95
|
+
declare const FluidTextArea: React.FC<FluidTextAreaProps>;
|
|
96
|
+
export default FluidTextArea;
|
|
@@ -25,7 +25,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
25
25
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
26
26
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
const FluidTextArea = _ref => {
|
|
29
29
|
let {
|
|
30
30
|
className,
|
|
31
31
|
...other
|
|
@@ -39,7 +39,7 @@ function FluidTextArea(_ref) {
|
|
|
39
39
|
}, /*#__PURE__*/React__default["default"].createElement(TextArea["default"], _rollupPluginBabelHelpers["extends"]({
|
|
40
40
|
className: classNames
|
|
41
41
|
}, other)));
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
FluidTextArea.propTypes = {
|
|
44
44
|
/**
|
|
45
45
|
* Provide a custom className that is applied directly to the underlying
|
|
@@ -0,0 +1,12 @@
|
|
|
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 FluidTextArea from './FluidTextArea';
|
|
8
|
+
import { type FluidTextAreaProps } from './FluidTextArea';
|
|
9
|
+
import { type FluidTextAreaSkeletonProps } from './FluidTextArea.Skeleton';
|
|
10
|
+
export default FluidTextArea;
|
|
11
|
+
export { FluidTextArea, type FluidTextAreaProps, type FluidTextAreaSkeletonProps, };
|
|
12
|
+
export { default as FluidTextAreaSkeleton } from './FluidTextArea.Skeleton';
|
|
@@ -13,6 +13,10 @@ interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
13
13
|
* Specify how the trigger should align with the tooltip
|
|
14
14
|
*/
|
|
15
15
|
align?: 'top' | 'top-left' | 'top-start' | 'top-right' | 'top-end' | 'bottom' | 'bottom-left' | 'bottom-start' | 'bottom-right' | 'bottom-end' | 'left' | 'right';
|
|
16
|
+
/**
|
|
17
|
+
* **Experimental**: Will attempt to automatically align the tooltip
|
|
18
|
+
*/
|
|
19
|
+
autoAlign?: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* Provide an icon or asset to be rendered inside of the IconButton
|
|
18
22
|
*/
|
|
@@ -28,6 +28,7 @@ const IconButtonKinds = ['primary', 'secondary', 'ghost', 'tertiary'];
|
|
|
28
28
|
const IconButton = /*#__PURE__*/React__default["default"].forwardRef(function IconButton(_ref, ref) {
|
|
29
29
|
let {
|
|
30
30
|
align,
|
|
31
|
+
autoAlign = false,
|
|
31
32
|
children,
|
|
32
33
|
className,
|
|
33
34
|
closeOnActivation = true,
|
|
@@ -48,6 +49,7 @@ const IconButton = /*#__PURE__*/React__default["default"].forwardRef(function Ic
|
|
|
48
49
|
});
|
|
49
50
|
return /*#__PURE__*/React__default["default"].createElement(Tooltip.Tooltip, {
|
|
50
51
|
align: align,
|
|
52
|
+
autoAlign: autoAlign,
|
|
51
53
|
closeOnActivation: closeOnActivation,
|
|
52
54
|
className: tooltipClasses,
|
|
53
55
|
defaultOpen: defaultOpen,
|
|
@@ -69,6 +71,10 @@ IconButton.propTypes = {
|
|
|
69
71
|
* Specify how the trigger should align with the tooltip
|
|
70
72
|
*/
|
|
71
73
|
align: PropTypes__default["default"].oneOf(['top', 'top-left', 'top-start', 'top-right', 'top-end', 'bottom', 'bottom-left', 'bottom-start', 'bottom-right', 'bottom-end', 'left', 'right']),
|
|
74
|
+
/**
|
|
75
|
+
* **Experimental**: Will attempt to automatically align the tooltip
|
|
76
|
+
*/
|
|
77
|
+
autoAlign: PropTypes__default["default"].bool,
|
|
72
78
|
/**
|
|
73
79
|
* Provide an icon or asset to be rendered inside of the IconButton
|
|
74
80
|
*/
|
|
@@ -292,7 +292,8 @@ const Menu = /*#__PURE__*/React.forwardRef(function Menu(_ref, forwardRef) {
|
|
|
292
292
|
[`${prefix}--menu--box-shadow-top`]: menuAlignment && menuAlignment.slice(0, 3) === 'top',
|
|
293
293
|
[`${prefix}--menu--open`]: open,
|
|
294
294
|
[`${prefix}--menu--shown`]: open && !legacyAutoalign || position[0] >= 0 && position[1] >= 0,
|
|
295
|
-
[`${prefix}--menu--with-icons`]: childContext.state.hasIcons
|
|
295
|
+
[`${prefix}--menu--with-icons`]: childContext.state.hasIcons,
|
|
296
|
+
[`${prefix}--autoalign`]: !legacyAutoalign
|
|
296
297
|
});
|
|
297
298
|
const rendered = /*#__PURE__*/React__default["default"].createElement(MenuContext.MenuContext.Provider, {
|
|
298
299
|
value: childContext
|
|
@@ -208,7 +208,8 @@ const FilterableMultiSelect = /*#__PURE__*/React__default["default"].forwardRef(
|
|
|
208
208
|
[`${prefix}--list-box--up`]: direction === 'top',
|
|
209
209
|
[`${prefix}--list-box__wrapper--fluid--invalid`]: isFluid && invalid,
|
|
210
210
|
[`${prefix}--list-box__wrapper--fluid--focus`]: isFluid && isFocused,
|
|
211
|
-
[`${prefix}--list-box__wrapper--slug`]: slug
|
|
211
|
+
[`${prefix}--list-box__wrapper--slug`]: slug,
|
|
212
|
+
[`${prefix}--autoalign`]: autoAlign
|
|
212
213
|
});
|
|
213
214
|
const helperId = !helperText ? undefined : `filterablemultiselect-helper-text-${filterableMultiSelectInstanceId}`;
|
|
214
215
|
const labelId = `${id}-label`;
|
|
@@ -290,6 +290,7 @@ const MultiSelect = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref
|
|
|
290
290
|
[`${prefix}--multi-select--selected`]: selectedItems && selectedItems.length > 0,
|
|
291
291
|
[`${prefix}--list-box--up`]: direction === 'top',
|
|
292
292
|
[`${prefix}--multi-select--readonly`]: readOnly,
|
|
293
|
+
[`${prefix}--autoalign`]: autoAlign,
|
|
293
294
|
[`${prefix}--multi-select--selectall`]: selectAll
|
|
294
295
|
});
|
|
295
296
|
|
|
@@ -93,7 +93,9 @@ const OverflowMenu = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
93
93
|
hookOnClick();
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
|
-
const containerClasses = cx__default["default"](className, `${prefix}--overflow-menu__container
|
|
96
|
+
const containerClasses = cx__default["default"](className, `${prefix}--overflow-menu__container`, {
|
|
97
|
+
[`${prefix}--autoalign`]: autoAlign
|
|
98
|
+
});
|
|
97
99
|
const menuClasses = cx__default["default"](`${prefix}--overflow-menu__${menuAlignment}`);
|
|
98
100
|
const triggerClasses = cx__default["default"](`${prefix}--overflow-menu`, {
|
|
99
101
|
[`${prefix}--overflow-menu--open`]: open
|
|
@@ -199,7 +199,7 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef(function Popov
|
|
|
199
199
|
[`${prefix}--popover--drop-shadow`]: dropShadow,
|
|
200
200
|
[`${prefix}--popover--high-contrast`]: highContrast,
|
|
201
201
|
[`${prefix}--popover--open`]: open,
|
|
202
|
-
[`${prefix}--popover--auto-align`]: autoAlign,
|
|
202
|
+
[`${prefix}--popover--auto-align ${prefix}--autoalign`]: autoAlign,
|
|
203
203
|
[`${prefix}--popover--${currentAlignment}`]: true,
|
|
204
204
|
[`${prefix}--popover--tab-tip`]: isTabTip
|
|
205
205
|
}, customClassName);
|
|
@@ -43,6 +43,10 @@ export interface DismissibleTagBaseProps {
|
|
|
43
43
|
* Provide text to be rendered inside of a the tag.
|
|
44
44
|
*/
|
|
45
45
|
text?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Provide a custom `title` to be inserted in the tag.
|
|
48
|
+
*/
|
|
49
|
+
tagTitle?: string;
|
|
46
50
|
/**
|
|
47
51
|
* Text to show on clear filters
|
|
48
52
|
*/
|
|
@@ -54,7 +58,7 @@ export interface DismissibleTagBaseProps {
|
|
|
54
58
|
}
|
|
55
59
|
export type DismissibleTagProps<T extends React.ElementType> = PolymorphicProps<T, DismissibleTagBaseProps>;
|
|
56
60
|
declare const DismissibleTag: {
|
|
57
|
-
<T extends React.ElementType<any, keyof React.JSX.IntrinsicElements>>({ className, disabled, id, renderIcon, title, onClose, slug, size, text, type, ...other }: DismissibleTagProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
<T extends React.ElementType<any, keyof React.JSX.IntrinsicElements>>({ className, disabled, id, renderIcon, title, onClose, slug, size, text, tagTitle, type, ...other }: DismissibleTagProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
58
62
|
propTypes: {
|
|
59
63
|
/**
|
|
60
64
|
* Provide a custom className that is applied to the containing <span>
|
|
@@ -90,6 +94,10 @@ declare const DismissibleTag: {
|
|
|
90
94
|
* Provide text to be rendered inside of a the tag.
|
|
91
95
|
*/
|
|
92
96
|
text: PropTypes.Requireable<string>;
|
|
97
|
+
/**
|
|
98
|
+
* Provide a custom `title` to be inserted in the tag.
|
|
99
|
+
*/
|
|
100
|
+
tagTitle: PropTypes.Requireable<string>;
|
|
93
101
|
/**
|
|
94
102
|
* Text to show on clear filters
|
|
95
103
|
*/
|
|
@@ -41,6 +41,7 @@ const DismissibleTag = _ref => {
|
|
|
41
41
|
slug,
|
|
42
42
|
size,
|
|
43
43
|
text,
|
|
44
|
+
tagTitle,
|
|
44
45
|
type,
|
|
45
46
|
...other
|
|
46
47
|
} = _ref;
|
|
@@ -86,7 +87,7 @@ const DismissibleTag = _ref => {
|
|
|
86
87
|
}, otherProps), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
87
88
|
className: `${prefix}--interactive--tag-children`
|
|
88
89
|
}, /*#__PURE__*/React__default["default"].createElement(Text.Text, {
|
|
89
|
-
title: text,
|
|
90
|
+
title: tagTitle ? tagTitle : text,
|
|
90
91
|
className: `${prefix}--tag__label`
|
|
91
92
|
}, text), /*#__PURE__*/React__default["default"].createElement(Tooltip.Tooltip, {
|
|
92
93
|
label: isEllipsisApplied ? dismissLabel : title,
|
|
@@ -99,8 +100,7 @@ const DismissibleTag = _ref => {
|
|
|
99
100
|
className: `${prefix}--tag__close-icon`,
|
|
100
101
|
onClick: handleClose,
|
|
101
102
|
disabled: disabled,
|
|
102
|
-
"aria-label": title
|
|
103
|
-
title: title
|
|
103
|
+
"aria-label": title
|
|
104
104
|
}, _Close || (_Close = /*#__PURE__*/React__default["default"].createElement(iconsReact.Close, null)))), normalizedSlug));
|
|
105
105
|
};
|
|
106
106
|
DismissibleTag.propTypes = {
|
|
@@ -138,6 +138,10 @@ DismissibleTag.propTypes = {
|
|
|
138
138
|
* Provide text to be rendered inside of a the tag.
|
|
139
139
|
*/
|
|
140
140
|
text: PropTypes__default["default"].string,
|
|
141
|
+
/**
|
|
142
|
+
* Provide a custom `title` to be inserted in the tag.
|
|
143
|
+
*/
|
|
144
|
+
tagTitle: PropTypes__default["default"].string,
|
|
141
145
|
/**
|
|
142
146
|
* Text to show on clear filters
|
|
143
147
|
*/
|
|
@@ -141,10 +141,10 @@ const Tag = /*#__PURE__*/React__default["default"].forwardRef(function Tag(_ref,
|
|
|
141
141
|
definition: children !== null && children !== undefined ? children : typeText,
|
|
142
142
|
className: `${prefix}--definition--tooltip--tag`
|
|
143
143
|
}, /*#__PURE__*/React__default["default"].createElement(Text.Text, {
|
|
144
|
-
title: children !== null && children !== undefined ? children : typeText,
|
|
144
|
+
title: children !== null && children !== undefined && typeof children === 'string' ? children : typeText,
|
|
145
145
|
className: labelClasses
|
|
146
146
|
}, children !== null && children !== undefined ? children : typeText)) : /*#__PURE__*/React__default["default"].createElement(Text.Text, {
|
|
147
|
-
title: children !== null && children !== undefined ? children : typeText,
|
|
147
|
+
title: children !== null && children !== undefined && typeof children === 'string' ? children : typeText,
|
|
148
148
|
className: labelClasses
|
|
149
149
|
}, children !== null && children !== undefined ? children : typeText), normalizedSlug);
|
|
150
150
|
});
|
|
@@ -84,7 +84,8 @@ function Toggletip(_ref2) {
|
|
|
84
84
|
const prefix = usePrefix.usePrefix();
|
|
85
85
|
const id = useId.useId();
|
|
86
86
|
const className = cx__default["default"](`${prefix}--toggletip`, customClassName, {
|
|
87
|
-
[`${prefix}--toggletip--open`]: open
|
|
87
|
+
[`${prefix}--toggletip--open`]: open,
|
|
88
|
+
[`${prefix}--autoalign`]: autoAlign
|
|
88
89
|
});
|
|
89
90
|
const actions = {
|
|
90
91
|
toggle: () => {
|
package/lib/index.js
CHANGED
|
@@ -163,6 +163,8 @@ var SideNavMenuItem = require('./components/UIShell/SideNavMenuItem.js');
|
|
|
163
163
|
var SideNavSwitcher = require('./components/UIShell/SideNavSwitcher.js');
|
|
164
164
|
var UnorderedList = require('./components/UnorderedList/UnorderedList.js');
|
|
165
165
|
var index = require('./components/FeatureFlags/index.js');
|
|
166
|
+
var FluidTextArea = require('./components/FluidTextArea/FluidTextArea.js');
|
|
167
|
+
var FluidTextArea_Skeleton = require('./components/FluidTextArea/FluidTextArea.Skeleton.js');
|
|
166
168
|
var index$c = require('./components/Heading/index.js');
|
|
167
169
|
var index$d = require('./components/IconButton/index.js');
|
|
168
170
|
var index$e = require('./components/Layer/index.js');
|
|
@@ -184,8 +186,6 @@ var usePrefix = require('./internal/usePrefix.js');
|
|
|
184
186
|
var useIdPrefix = require('./internal/useIdPrefix.js');
|
|
185
187
|
var FluidDatePicker_Skeleton = require('./components/FluidDatePicker/FluidDatePicker.Skeleton.js');
|
|
186
188
|
var FluidSearch_Skeleton = require('./components/FluidSearch/FluidSearch.Skeleton.js');
|
|
187
|
-
var FluidTextArea = require('./components/FluidTextArea/FluidTextArea.js');
|
|
188
|
-
var FluidTextArea_Skeleton = require('./components/FluidTextArea/FluidTextArea.Skeleton.js');
|
|
189
189
|
var FluidTextInput = require('./components/FluidTextInput/FluidTextInput.js');
|
|
190
190
|
var FluidTextInput_Skeleton = require('./components/FluidTextInput/FluidTextInput.Skeleton.js');
|
|
191
191
|
var PageSelector = require('./components/Pagination/experimental/PageSelector.js');
|
|
@@ -429,6 +429,8 @@ exports.UnorderedList = UnorderedList["default"];
|
|
|
429
429
|
exports.unstable_FeatureFlags = index.FeatureFlags;
|
|
430
430
|
exports.unstable_useFeatureFlag = index.useFeatureFlag;
|
|
431
431
|
exports.unstable_useFeatureFlags = index.useFeatureFlags;
|
|
432
|
+
exports.unstable__FluidTextArea = FluidTextArea["default"];
|
|
433
|
+
exports.unstable__FluidTextAreaSkeleton = FluidTextArea_Skeleton["default"];
|
|
432
434
|
exports.Heading = index$c.Heading;
|
|
433
435
|
exports.Section = index$c.Section;
|
|
434
436
|
exports.IconButton = index$d.IconButton;
|
|
@@ -466,8 +468,6 @@ exports.usePrefix = usePrefix.usePrefix;
|
|
|
466
468
|
exports.useIdPrefix = useIdPrefix.useIdPrefix;
|
|
467
469
|
exports.unstable__FluidDatePickerSkeleton = FluidDatePicker_Skeleton["default"];
|
|
468
470
|
exports.unstable__FluidSearchSkeleton = FluidSearch_Skeleton["default"];
|
|
469
|
-
exports.unstable__FluidTextArea = FluidTextArea["default"];
|
|
470
|
-
exports.unstable__FluidTextAreaSkeleton = FluidTextArea_Skeleton["default"];
|
|
471
471
|
exports.unstable__FluidTextInput = FluidTextInput["default"];
|
|
472
472
|
exports.unstable__FluidTextInputSkeleton = FluidTextInput_Skeleton["default"];
|
|
473
473
|
exports.unstable_PageSelector = PageSelector["default"];
|
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.66.0
|
|
4
|
+
"version": "1.66.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@babel/runtime": "^7.24.7",
|
|
51
51
|
"@carbon/feature-flags": "^0.22.0",
|
|
52
|
-
"@carbon/icons-react": "^11.49.0
|
|
53
|
-
"@carbon/layout": "^11.26.0
|
|
54
|
-
"@carbon/styles": "^1.65.0
|
|
52
|
+
"@carbon/icons-react": "^11.49.0",
|
|
53
|
+
"@carbon/layout": "^11.26.0",
|
|
54
|
+
"@carbon/styles": "^1.65.0",
|
|
55
55
|
"@floating-ui/react": "^0.26.0",
|
|
56
56
|
"@ibm/telemetry-js": "^1.5.0",
|
|
57
57
|
"classnames": "2.5.1",
|
|
@@ -79,9 +79,9 @@
|
|
|
79
79
|
"@babel/preset-env": "^7.24.7",
|
|
80
80
|
"@babel/preset-react": "^7.24.7",
|
|
81
81
|
"@babel/preset-typescript": "^7.24.7",
|
|
82
|
-
"@carbon/test-utils": "^10.32.0
|
|
83
|
-
"@carbon/themes": "^11.40.0
|
|
84
|
-
"@figma/code-connect": "^1.0.
|
|
82
|
+
"@carbon/test-utils": "^10.32.0",
|
|
83
|
+
"@carbon/themes": "^11.40.0",
|
|
84
|
+
"@figma/code-connect": "^1.0.6",
|
|
85
85
|
"@rollup/plugin-babel": "^6.0.0",
|
|
86
86
|
"@rollup/plugin-commonjs": "^26.0.0",
|
|
87
87
|
"@rollup/plugin-node-resolve": "^15.0.0",
|
|
@@ -131,7 +131,7 @@
|
|
|
131
131
|
"style-loader": "^4.0.0",
|
|
132
132
|
"typescript-config-carbon": "^0.3.0",
|
|
133
133
|
"webpack": "^5.65.0",
|
|
134
|
-
"webpack-dev-server": "^
|
|
134
|
+
"webpack-dev-server": "^5.0.0"
|
|
135
135
|
},
|
|
136
136
|
"sideEffects": [
|
|
137
137
|
"es/index.js",
|
|
@@ -144,5 +144,5 @@
|
|
|
144
144
|
"**/*.scss",
|
|
145
145
|
"**/*.css"
|
|
146
146
|
],
|
|
147
|
-
"gitHead": "
|
|
147
|
+
"gitHead": "d706ffca254bad174fdfc88c05f620ba547cc369"
|
|
148
148
|
}
|