@carbon/react 1.80.0 → 1.81.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 +869 -869
- package/es/components/Accordion/AccordionItem.d.ts +2 -2
- package/es/components/AspectRatio/AspectRatio.d.ts +2 -2
- package/es/components/Button/Button.js +3 -0
- package/es/components/Button/ButtonBase.d.ts +2 -2
- package/es/components/ChatButton/ChatButton.js +5 -3
- package/es/components/CodeSnippet/CodeSnippet.js +2 -0
- package/es/components/ComboBox/ComboBox.d.ts +1 -1
- package/es/components/ComposedModal/ComposedModal.d.ts +1 -1
- package/es/components/ComposedModal/ComposedModal.js +17 -10
- package/es/components/ComposedModal/ModalFooter.js +0 -1
- package/es/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -1
- package/es/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/es/components/ContextMenu/useContextMenu.d.ts +1 -1
- package/es/components/DataTable/DataTable.d.ts +5 -5
- package/es/components/DataTable/DataTable.js +1 -1
- package/es/components/DataTable/TableActionList.d.ts +1 -1
- package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/es/components/DataTable/TableHead.d.ts +1 -1
- package/es/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/es/components/DataTable/TableToolbarSearch.d.ts +1 -1
- package/es/components/DatePickerInput/DatePickerInput.d.ts +2 -2
- package/es/components/Dropdown/Dropdown.d.ts +1 -1
- package/es/components/FeatureFlags/index.d.ts +1 -1
- package/es/components/FileUploader/FileUploader.d.ts +6 -1
- package/es/components/FileUploader/FileUploader.js +3 -1
- package/es/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/es/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/es/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +3 -3
- package/es/components/FluidMultiSelect/FluidMultiSelect.d.ts +2 -2
- package/es/components/FluidMultiSelect/FluidMultiSelect.js +6 -4
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.js +40 -0
- package/es/components/FluidNumberInput/FluidNumberInput.js +123 -0
- package/es/components/FluidTextInput/FluidTextInput.js +2 -2
- package/es/components/Grid/Column.js +1 -1
- package/es/components/Grid/GridTypes.d.ts +6 -1
- package/es/components/Layer/LayerLevel.d.ts +3 -3
- package/es/components/Layer/LayerLevel.js +4 -3
- package/es/components/Layer/index.d.ts +4 -2
- package/es/components/Layer/index.js +3 -2
- package/es/components/Link/Link.js +3 -1
- package/es/components/Menu/Menu.d.ts +1 -1
- package/es/components/Menu/MenuContext.d.ts +1 -1
- package/es/components/Modal/Modal.js +22 -7
- package/es/components/ModalWrapper/ModalWrapper.d.ts +2 -2
- package/es/components/MultiSelect/FilterableMultiSelect.d.ts +3 -3
- package/es/components/MultiSelect/FilterableMultiSelect.js +4 -3
- package/es/components/MultiSelect/MultiSelect.d.ts +2 -6
- package/es/components/MultiSelect/MultiSelect.js +18 -3
- package/es/components/MultiSelect/index.d.ts +2 -4
- package/es/components/NumberInput/NumberInput.js +2 -1
- package/es/components/OverflowMenu/OverflowMenu.d.ts +7 -1
- package/es/components/OverflowMenu/OverflowMenu.js +69 -17
- package/es/components/OverflowMenu/index.d.ts +3 -5
- package/es/components/OverflowMenu/index.js +9 -4
- package/es/components/OverflowMenu/next/index.js +0 -1
- package/es/components/OverflowMenuItem/OverflowMenuItem.d.ts +4 -0
- package/es/components/PageHeader/PageHeader.js +1 -1
- package/es/components/PaginationNav/PaginationNav.d.ts +1 -1
- package/es/components/PaginationNav/PaginationNav.js +2 -1
- package/es/components/Popover/index.d.ts +3 -2
- package/es/components/Popover/index.js +10 -5
- package/es/components/Portal/index.d.ts +1 -1
- package/es/components/Search/Search.js +0 -1
- package/es/components/SkeletonText/SkeletonText.js +3 -1
- package/es/components/Slider/Slider.d.ts +3 -13
- package/es/components/Slider/Slider.js +2 -14
- package/es/components/Tabs/Tabs.d.ts +2 -2
- package/es/components/Tabs/Tabs.js +8 -6
- package/es/components/Tabs/usePressable.js +1 -1
- package/es/components/Tag/Tag.js +9 -2
- package/es/components/Text/Text.js +3 -2
- package/es/components/TextInput/ControlledPasswordInput.d.ts +1 -1
- package/es/components/TextInput/ControlledPasswordInput.js +0 -6
- package/es/components/TextInput/TextInput.d.ts +1 -1
- package/es/components/TextInput/TextInput.js +0 -4
- package/es/components/TextInput/index.d.ts +6 -0
- package/es/components/TextInput/index.js +0 -8
- package/es/components/Tile/Tile.js +0 -1
- package/es/components/Toggle/Toggle.d.ts +1 -1
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.d.ts +9 -14
- package/es/components/ToggleSmall/ToggleSmall.Skeleton.js +37 -41
- package/es/components/Toggletip/index.js +11 -8
- package/es/components/Tooltip/Tooltip.d.ts +1 -1
- package/es/components/TreeView/TreeView.d.ts +1 -1
- package/es/components/UIShell/Content.d.ts +14 -1
- package/es/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/es/components/UIShell/HeaderMenu.d.ts +2 -99
- package/es/components/UIShell/HeaderMenu.js +10 -3
- package/es/components/UIShell/HeaderMenuButton.d.ts +1 -98
- package/es/components/UIShell/HeaderMenuItem.d.ts +3 -4
- package/es/components/UIShell/HeaderMenuItem.js +3 -3
- package/es/components/UIShell/HeaderName.js +1 -1
- package/es/components/UIShell/HeaderNavigation.d.ts +0 -97
- package/es/components/UIShell/Link.d.ts +8 -8
- package/es/components/UIShell/Link.js +8 -5
- package/es/components/UIShell/SideNav.d.ts +3 -3
- package/es/components/UIShell/SideNav.js +1 -1
- package/es/components/UIShell/SideNavHeader.js +0 -1
- package/es/components/UIShell/SideNavLink.d.ts +3 -4
- package/es/components/UIShell/SideNavLink.js +8 -3
- package/es/components/UIShell/SideNavMenu.js +0 -1
- package/es/components/UIShell/SideNavMenuItem.d.ts +1 -49
- package/es/components/UIShell/SideNavMenuItem.js +1 -1
- package/es/components/UIShell/SideNavSwitcher.js +0 -1
- package/es/components/UIShell/SwitcherItem.d.ts +2 -2
- package/es/components/UIShell/SwitcherItem.js +1 -1
- package/es/index.d.ts +2 -2
- package/es/index.js +7 -7
- package/es/internal/FloatingMenu.js +2 -1
- package/es/internal/clamp.d.ts +10 -0
- package/es/internal/clamp.js +13 -0
- package/es/internal/useEvent.d.ts +9 -0
- package/es/internal/useEvent.js +8 -49
- package/es/internal/useId.js +1 -1
- package/es/internal/useMatchMedia.d.ts +7 -2
- package/es/internal/useMatchMedia.js +9 -10
- package/es/internal/useNoInteractiveChildren.js +4 -2
- package/es/internal/useOutsideClick.d.ts +1 -1
- package/es/prop-types/AriaPropTypes.js +1 -1
- package/es/prop-types/isRequiredOneOf.d.ts +16 -0
- package/es/prop-types/isRequiredOneOf.js +11 -9
- package/es/tools/setupGetInstanceId.d.ts +12 -0
- package/es/tools/setupGetInstanceId.js +7 -8
- package/es/tools/toggleClass.d.ts +14 -0
- package/es/tools/toggleClass.js +9 -10
- package/es/tools/wrapComponent.d.ts +1 -1
- package/es/types/common.d.ts +1 -6
- package/lib/components/Accordion/AccordionItem.d.ts +2 -2
- package/lib/components/AspectRatio/AspectRatio.d.ts +2 -2
- package/lib/components/Button/Button.js +3 -0
- package/lib/components/Button/ButtonBase.d.ts +2 -2
- package/lib/components/ChatButton/ChatButton.js +5 -3
- package/lib/components/CodeSnippet/CodeSnippet.js +2 -0
- package/lib/components/ComboBox/ComboBox.d.ts +1 -1
- package/lib/components/ComposedModal/ComposedModal.d.ts +1 -1
- package/lib/components/ComposedModal/ComposedModal.js +16 -9
- package/lib/components/ComposedModal/ModalFooter.js +0 -1
- package/lib/components/ContainedList/ContainedListItem/ContainedListItem.js +0 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.d.ts +1 -1
- package/lib/components/ContextMenu/useContextMenu.d.ts +1 -1
- package/lib/components/DataTable/DataTable.d.ts +5 -5
- package/lib/components/DataTable/DataTable.js +1 -1
- package/lib/components/DataTable/TableActionList.d.ts +1 -1
- package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/lib/components/DataTable/TableHead.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarContent.d.ts +1 -1
- package/lib/components/DataTable/TableToolbarSearch.d.ts +1 -1
- package/lib/components/DatePickerInput/DatePickerInput.d.ts +2 -2
- package/lib/components/Dropdown/Dropdown.d.ts +1 -1
- package/lib/components/FeatureFlags/index.d.ts +1 -1
- package/lib/components/FileUploader/FileUploader.d.ts +6 -1
- package/lib/components/FileUploader/FileUploader.js +3 -1
- package/lib/components/FileUploader/FileUploaderButton.d.ts +1 -1
- package/lib/components/FileUploader/FileUploaderDropContainer.d.ts +1 -1
- package/lib/components/FluidMultiSelect/FluidFilterableMultiSelect.d.ts +3 -3
- package/lib/components/FluidMultiSelect/FluidMultiSelect.d.ts +2 -2
- package/lib/components/FluidMultiSelect/FluidMultiSelect.js +7 -5
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.js +50 -0
- package/lib/components/FluidNumberInput/FluidNumberInput.js +133 -0
- package/lib/components/FluidTextInput/FluidTextInput.js +2 -2
- package/lib/components/Grid/Column.js +1 -1
- package/lib/components/Grid/GridTypes.d.ts +6 -1
- package/lib/components/Layer/LayerLevel.d.ts +3 -3
- package/lib/components/Layer/LayerLevel.js +4 -2
- package/lib/components/Layer/index.d.ts +4 -2
- package/lib/components/Layer/index.js +2 -1
- package/lib/components/Link/Link.js +3 -1
- package/lib/components/Menu/Menu.d.ts +1 -1
- package/lib/components/Menu/MenuContext.d.ts +1 -1
- package/lib/components/Modal/Modal.js +21 -6
- package/lib/components/ModalWrapper/ModalWrapper.d.ts +2 -2
- package/lib/components/MultiSelect/FilterableMultiSelect.d.ts +3 -3
- package/lib/components/MultiSelect/FilterableMultiSelect.js +3 -2
- package/lib/components/MultiSelect/MultiSelect.d.ts +2 -6
- package/lib/components/MultiSelect/MultiSelect.js +17 -2
- package/lib/components/MultiSelect/index.d.ts +2 -4
- package/lib/components/NumberInput/NumberInput.js +2 -1
- package/lib/components/OverflowMenu/OverflowMenu.d.ts +7 -1
- package/lib/components/OverflowMenu/OverflowMenu.js +69 -17
- package/lib/components/OverflowMenu/index.d.ts +3 -5
- package/lib/components/OverflowMenu/index.js +8 -3
- package/lib/components/OverflowMenu/next/index.js +0 -1
- package/lib/components/OverflowMenuItem/OverflowMenuItem.d.ts +4 -0
- package/lib/components/PageHeader/PageHeader.js +1 -1
- package/lib/components/PaginationNav/PaginationNav.d.ts +1 -1
- package/lib/components/PaginationNav/PaginationNav.js +2 -1
- package/lib/components/Popover/index.d.ts +3 -2
- package/lib/components/Popover/index.js +10 -5
- package/lib/components/Portal/index.d.ts +1 -1
- package/lib/components/Search/Search.js +0 -1
- package/lib/components/SkeletonText/SkeletonText.js +3 -1
- package/lib/components/Slider/Slider.d.ts +3 -13
- package/lib/components/Slider/Slider.js +2 -14
- package/lib/components/Tabs/Tabs.d.ts +2 -2
- package/lib/components/Tabs/Tabs.js +7 -5
- package/lib/components/Tabs/usePressable.js +1 -1
- package/lib/components/Tag/Tag.js +9 -2
- package/lib/components/Text/Text.js +2 -1
- package/lib/components/TextInput/ControlledPasswordInput.d.ts +1 -1
- package/lib/components/TextInput/ControlledPasswordInput.js +0 -6
- package/lib/components/TextInput/TextInput.d.ts +1 -1
- package/lib/components/TextInput/TextInput.js +0 -4
- package/lib/components/TextInput/index.d.ts +6 -0
- package/lib/components/TextInput/index.js +1 -7
- package/lib/components/Tile/Tile.js +0 -1
- package/lib/components/Toggle/Toggle.d.ts +1 -1
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.d.ts +9 -14
- package/lib/components/ToggleSmall/ToggleSmall.Skeleton.js +34 -39
- package/lib/components/Toggletip/index.js +11 -8
- package/lib/components/Tooltip/Tooltip.d.ts +1 -1
- package/lib/components/TreeView/TreeView.d.ts +1 -1
- package/lib/components/UIShell/Content.d.ts +14 -1
- package/lib/components/UIShell/HeaderGlobalBar.d.ts +1 -1
- package/lib/components/UIShell/HeaderMenu.d.ts +2 -99
- package/lib/components/UIShell/HeaderMenu.js +10 -3
- package/lib/components/UIShell/HeaderMenuButton.d.ts +1 -98
- package/lib/components/UIShell/HeaderMenuItem.d.ts +3 -4
- package/lib/components/UIShell/HeaderMenuItem.js +3 -3
- package/lib/components/UIShell/HeaderName.js +1 -1
- package/lib/components/UIShell/HeaderNavigation.d.ts +0 -97
- package/lib/components/UIShell/Link.d.ts +8 -8
- package/lib/components/UIShell/Link.js +7 -5
- package/lib/components/UIShell/SideNav.d.ts +3 -3
- package/lib/components/UIShell/SideNav.js +1 -1
- package/lib/components/UIShell/SideNavHeader.js +0 -1
- package/lib/components/UIShell/SideNavLink.d.ts +3 -4
- package/lib/components/UIShell/SideNavLink.js +8 -3
- package/lib/components/UIShell/SideNavMenu.js +0 -1
- package/lib/components/UIShell/SideNavMenuItem.d.ts +1 -49
- package/lib/components/UIShell/SideNavMenuItem.js +1 -1
- package/lib/components/UIShell/SideNavSwitcher.js +0 -1
- package/lib/components/UIShell/SwitcherItem.d.ts +2 -2
- package/lib/components/UIShell/SwitcherItem.js +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +13 -11
- package/lib/internal/FloatingMenu.js +2 -1
- package/lib/internal/clamp.d.ts +10 -0
- package/lib/internal/clamp.js +17 -0
- package/lib/internal/useEvent.d.ts +9 -0
- package/lib/internal/useEvent.js +8 -49
- package/lib/internal/useId.js +1 -1
- package/lib/internal/useMatchMedia.d.ts +7 -2
- package/lib/internal/useMatchMedia.js +9 -10
- package/lib/internal/useNoInteractiveChildren.js +4 -2
- package/lib/internal/useOutsideClick.d.ts +1 -1
- package/lib/prop-types/AriaPropTypes.js +1 -1
- package/lib/prop-types/isRequiredOneOf.d.ts +16 -0
- package/lib/prop-types/isRequiredOneOf.js +11 -9
- package/lib/tools/setupGetInstanceId.d.ts +12 -0
- package/lib/tools/setupGetInstanceId.js +7 -8
- package/lib/tools/toggleClass.d.ts +14 -0
- package/lib/tools/toggleClass.js +9 -10
- package/lib/tools/wrapComponent.d.ts +1 -1
- package/lib/types/common.d.ts +1 -6
- package/package.json +14 -14
- package/telemetry.yml +11 -12
- package/es/components/MultiSelect/index.js +0 -13
- package/es/internal/ClickListener.d.ts +0 -13
- package/es/internal/ClickListener.js +0 -47
- package/lib/components/MultiSelect/index.js +0 -19
- package/lib/internal/ClickListener.d.ts +0 -13
- package/lib/internal/ClickListener.js +0 -51
|
@@ -56,7 +56,9 @@ const propMappingFunction = deprecatedValue => {
|
|
|
56
56
|
};
|
|
57
57
|
return mapping[deprecatedValue];
|
|
58
58
|
};
|
|
59
|
-
const Popover = /*#__PURE__*/React__default["default"].forwardRef(function PopoverRenderFunction(_ref,
|
|
59
|
+
const Popover = /*#__PURE__*/React__default["default"].forwardRef(function PopoverRenderFunction(_ref,
|
|
60
|
+
//this is a workaround, have to come back and fix this.
|
|
61
|
+
forwardRef) {
|
|
60
62
|
let {
|
|
61
63
|
isTabTip,
|
|
62
64
|
align: initialAlign = isTabTip ? 'bottom-start' : 'bottom',
|
|
@@ -86,8 +88,11 @@ const Popover = /*#__PURE__*/React__default["default"].forwardRef(function Popov
|
|
|
86
88
|
onRequestClose?.();
|
|
87
89
|
}
|
|
88
90
|
});
|
|
89
|
-
useEvent.useWindowEvent('click',
|
|
90
|
-
|
|
91
|
+
useEvent.useWindowEvent('click', _ref2 => {
|
|
92
|
+
let {
|
|
93
|
+
target
|
|
94
|
+
} = _ref2;
|
|
95
|
+
if (open && target instanceof Node && !popover.current?.contains(target)) {
|
|
91
96
|
onRequestClose?.();
|
|
92
97
|
}
|
|
93
98
|
});
|
|
@@ -361,12 +366,12 @@ Popover.propTypes = {
|
|
|
361
366
|
open: PropTypes__default["default"].bool.isRequired
|
|
362
367
|
};
|
|
363
368
|
function PopoverContentRenderFunction(// eslint-disable-next-line react/prop-types
|
|
364
|
-
|
|
369
|
+
_ref3, forwardRef) {
|
|
365
370
|
let {
|
|
366
371
|
className,
|
|
367
372
|
children,
|
|
368
373
|
...rest
|
|
369
|
-
} =
|
|
374
|
+
} = _ref3;
|
|
370
375
|
const prefix = usePrefix.usePrefix();
|
|
371
376
|
const {
|
|
372
377
|
setFloating,
|
|
@@ -13,7 +13,7 @@ export interface PortalProps {
|
|
|
13
13
|
/**
|
|
14
14
|
* Provide a ref for a container node to render the portal
|
|
15
15
|
*/
|
|
16
|
-
container?: React.RefObject<HTMLElement>;
|
|
16
|
+
container?: React.RefObject<HTMLElement | null>;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Helper component for rendering content within a portal. By default, the
|
|
@@ -232,7 +232,6 @@ Search.propTypes = {
|
|
|
232
232
|
/**
|
|
233
233
|
* A component used to render an icon.
|
|
234
234
|
*/
|
|
235
|
-
// @ts-expect-error: PropTypes are not expressive enough to cover this case
|
|
236
235
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
237
236
|
/**
|
|
238
237
|
* Specify the role for the underlying `<input>`, defaults to `searchbox`
|
|
@@ -69,7 +69,9 @@ const SkeletonText = _ref => {
|
|
|
69
69
|
lines.push(/*#__PURE__*/React__default["default"].createElement("p", _rollupPluginBabelHelpers["extends"]({
|
|
70
70
|
className: skeletonTextClasses,
|
|
71
71
|
key: i,
|
|
72
|
-
ref: el =>
|
|
72
|
+
ref: el => {
|
|
73
|
+
refs.current = [...refs.current, el];
|
|
74
|
+
}
|
|
73
75
|
}, rest)));
|
|
74
76
|
}
|
|
75
77
|
if (lineCountNumber !== 1) {
|
|
@@ -319,9 +319,9 @@ declare class Slider extends PureComponent<SliderProps> {
|
|
|
319
319
|
correctedPosition: null;
|
|
320
320
|
isRtl: boolean;
|
|
321
321
|
};
|
|
322
|
-
thumbRef: React.RefObject<HTMLDivElement>;
|
|
323
|
-
thumbRefUpper: React.RefObject<HTMLDivElement>;
|
|
324
|
-
filledTrackRef: React.RefObject<HTMLDivElement>;
|
|
322
|
+
thumbRef: React.RefObject<HTMLDivElement | null>;
|
|
323
|
+
thumbRefUpper: React.RefObject<HTMLDivElement | null>;
|
|
324
|
+
filledTrackRef: React.RefObject<HTMLDivElement | null>;
|
|
325
325
|
element: HTMLDivElement | null;
|
|
326
326
|
inputId: string;
|
|
327
327
|
track: HTMLDivElement | null | undefined;
|
|
@@ -339,16 +339,6 @@ declare class Slider extends PureComponent<SliderProps> {
|
|
|
339
339
|
* should be called.
|
|
340
340
|
*/
|
|
341
341
|
componentDidUpdate(prevProps: any, prevState: any): void;
|
|
342
|
-
/**
|
|
343
|
-
* Synonymous to ECMA2017+ `Math.clamp`.
|
|
344
|
-
*
|
|
345
|
-
* @param {number} val
|
|
346
|
-
* @param {number} min
|
|
347
|
-
* @param {number} max
|
|
348
|
-
*
|
|
349
|
-
* @returns `val` if `max>=val>=min`; `min` if `val<min`; `max` if `val>max`.
|
|
350
|
-
*/
|
|
351
|
-
clamp(val: any, min: any, max: any): number;
|
|
352
342
|
/**
|
|
353
343
|
* Rounds a given value to the nearest step defined by the slider's `step`
|
|
354
344
|
* prop.
|
|
@@ -23,6 +23,7 @@ require('../Text/index.js');
|
|
|
23
23
|
require('../Tooltip/DefinitionTooltip.js');
|
|
24
24
|
var Tooltip = require('../Tooltip/Tooltip.js');
|
|
25
25
|
var SliderHandles = require('./SliderHandles.js');
|
|
26
|
+
var clamp = require('../../internal/clamp.js');
|
|
26
27
|
var throttle = require('../../node_modules/es-toolkit/dist/compat/function/throttle.mjs.js');
|
|
27
28
|
var Text = require('../Text/Text.js');
|
|
28
29
|
|
|
@@ -574,7 +575,7 @@ class Slider extends React.PureComponent {
|
|
|
574
575
|
range
|
|
575
576
|
});
|
|
576
577
|
/** `leftPercentRaw` clamped between 0 and 1. */
|
|
577
|
-
const leftPercent =
|
|
578
|
+
const leftPercent = clamp.clamp(leftPercentRaw, 0, 1);
|
|
578
579
|
if (useRawValue) {
|
|
579
580
|
return {
|
|
580
581
|
value,
|
|
@@ -865,19 +866,6 @@ class Slider extends React.PureComponent {
|
|
|
865
866
|
}
|
|
866
867
|
}
|
|
867
868
|
|
|
868
|
-
/**
|
|
869
|
-
* Synonymous to ECMA2017+ `Math.clamp`.
|
|
870
|
-
*
|
|
871
|
-
* @param {number} val
|
|
872
|
-
* @param {number} min
|
|
873
|
-
* @param {number} max
|
|
874
|
-
*
|
|
875
|
-
* @returns `val` if `max>=val>=min`; `min` if `val<min`; `max` if `val>max`.
|
|
876
|
-
*/
|
|
877
|
-
clamp(val, min, max) {
|
|
878
|
-
return Math.max(min, Math.min(val, max));
|
|
879
|
-
}
|
|
880
|
-
|
|
881
869
|
/**
|
|
882
870
|
* Rounds a given value to the nearest step defined by the slider's `step`
|
|
883
871
|
* prop.
|
|
@@ -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, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ComponentType, type
|
|
8
|
+
import React, { type ReactNode, type MouseEvent, type KeyboardEvent, type HTMLAttributes, type ComponentType, type HTMLElementType } from 'react';
|
|
9
9
|
type DivAttributes = HTMLAttributes<HTMLDivElement>;
|
|
10
10
|
/**
|
|
11
11
|
* Tabs
|
|
@@ -312,7 +312,7 @@ export interface TabProps extends HTMLAttributes<HTMLElement> {
|
|
|
312
312
|
/**
|
|
313
313
|
* Provide a custom element to render instead of the default button
|
|
314
314
|
*/
|
|
315
|
-
as?:
|
|
315
|
+
as?: HTMLElementType | ComponentType;
|
|
316
316
|
/**
|
|
317
317
|
* Provide child elements to be rendered inside `Tab`.
|
|
318
318
|
*/
|
|
@@ -88,6 +88,9 @@ function Tabs(_ref) {
|
|
|
88
88
|
onTabCloseRequest
|
|
89
89
|
} = _ref;
|
|
90
90
|
const baseId = useId.useId('ccs');
|
|
91
|
+
if (dismissable && !onTabCloseRequest) {
|
|
92
|
+
console.error('dismissable property specified without also providing an onTabCloseRequest property.');
|
|
93
|
+
}
|
|
91
94
|
// The active index is used to track the element which has focus in our tablist
|
|
92
95
|
const [activeIndex, setActiveIndex] = React.useState(defaultSelectedIndex);
|
|
93
96
|
// The selected index is used for the tab/panel pairing which is "visible"
|
|
@@ -289,7 +292,8 @@ function TabList(_ref4) {
|
|
|
289
292
|
let hasSecondaryLabelTabs = false;
|
|
290
293
|
if (contained) {
|
|
291
294
|
hasSecondaryLabelTabs = React__default["default"].Children.toArray(children).some(child => {
|
|
292
|
-
|
|
295
|
+
const _child = child;
|
|
296
|
+
return /*#__PURE__*/React__default["default"].isValidElement(child) && !!_child.props.secondaryLabel;
|
|
293
297
|
});
|
|
294
298
|
}
|
|
295
299
|
const isLg = useMatchMedia.useMatchMedia(lgMediaQuery);
|
|
@@ -653,7 +657,7 @@ function TabListVertical(_ref8) {
|
|
|
653
657
|
if (containerTop && containerHeight) {
|
|
654
658
|
// scrolls so selected tab is in view
|
|
655
659
|
if (selectedPositionTop - halfTabHeight < containerTop || selectedPositionTop - containerTop + verticalTabHeight + halfTabHeight > containerHeight) {
|
|
656
|
-
ref.current.scrollTo({
|
|
660
|
+
ref.current && ref.current.scrollTo({
|
|
657
661
|
top: (selectedIndex - 1) * verticalTabHeight,
|
|
658
662
|
behavior: 'smooth'
|
|
659
663
|
});
|
|
@@ -994,7 +998,6 @@ Tab.propTypes = {
|
|
|
994
998
|
/**
|
|
995
999
|
* Provide a custom element to render instead of the default button
|
|
996
1000
|
*/
|
|
997
|
-
// @ts-expect-error: Invalid prop type derivation
|
|
998
1001
|
as: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].elementType]),
|
|
999
1002
|
/**
|
|
1000
1003
|
* Provide child elements to be rendered inside `Tab`.
|
|
@@ -1025,7 +1028,6 @@ Tab.propTypes = {
|
|
|
1025
1028
|
/**
|
|
1026
1029
|
* A component used to render an icon.
|
|
1027
1030
|
*/
|
|
1028
|
-
// @ts-expect-error: Invalid prop type derivation
|
|
1029
1031
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object]),
|
|
1030
1032
|
/**
|
|
1031
1033
|
* An optional label to render under the primary tab label.
|
|
@@ -1054,7 +1056,7 @@ const IconTab = /*#__PURE__*/React__default["default"].forwardRef(function IconT
|
|
|
1054
1056
|
const value = React.useMemo(() => ({
|
|
1055
1057
|
badgeIndicator
|
|
1056
1058
|
}), [badgeIndicator]);
|
|
1057
|
-
const hasSize20 = /*#__PURE__*/
|
|
1059
|
+
const hasSize20 = /*#__PURE__*/React.isValidElement(children) && children.props.size === 20;
|
|
1058
1060
|
const classNames = cx__default["default"](`${prefix}--tabs__nav-item--icon-only`, customClassName, {
|
|
1059
1061
|
[`${prefix}--tabs__nav-item--icon-only__20`]: hasSize20
|
|
1060
1062
|
});
|
|
@@ -50,7 +50,7 @@ const SIZES = {
|
|
|
50
50
|
md: 'md',
|
|
51
51
|
lg: 'lg'
|
|
52
52
|
};
|
|
53
|
-
const
|
|
53
|
+
const TagBase = /*#__PURE__*/React__default["default"].forwardRef((_ref, forwardRef) => {
|
|
54
54
|
let {
|
|
55
55
|
children,
|
|
56
56
|
className,
|
|
@@ -71,7 +71,13 @@ const Tag = /*#__PURE__*/React__default["default"].forwardRef((_ref, forwardRef)
|
|
|
71
71
|
...other
|
|
72
72
|
} = _ref;
|
|
73
73
|
const prefix = usePrefix.usePrefix();
|
|
74
|
-
const tagRef = React.useRef();
|
|
74
|
+
const tagRef = React.useRef(null);
|
|
75
|
+
if (filter) {
|
|
76
|
+
console.warn('The `filter` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.');
|
|
77
|
+
}
|
|
78
|
+
if (onClose) {
|
|
79
|
+
console.warn('The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.');
|
|
80
|
+
}
|
|
75
81
|
const ref = useMergedRefs.useMergedRefs([forwardRef, tagRef]);
|
|
76
82
|
const tagId = id || `tag-${useId.useId()}`;
|
|
77
83
|
const [isEllipsisApplied, setIsEllipsisApplied] = React.useState(false);
|
|
@@ -151,6 +157,7 @@ const Tag = /*#__PURE__*/React__default["default"].forwardRef((_ref, forwardRef)
|
|
|
151
157
|
className: `${prefix}--tag__decorator`
|
|
152
158
|
}, normalizedDecorator) : '');
|
|
153
159
|
});
|
|
160
|
+
const Tag = TagBase;
|
|
154
161
|
Tag.propTypes = {
|
|
155
162
|
/**
|
|
156
163
|
* Provide an alternative tag or component to use instead of the default
|
|
@@ -20,7 +20,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
20
20
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
21
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
22
22
|
|
|
23
|
-
const
|
|
23
|
+
const TextBase = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) => {
|
|
24
24
|
let {
|
|
25
25
|
as,
|
|
26
26
|
children,
|
|
@@ -63,6 +63,7 @@ const Text = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
63
63
|
ref: ref
|
|
64
64
|
}, rest, textProps), children));
|
|
65
65
|
});
|
|
66
|
+
const Text = TextBase;
|
|
66
67
|
Text.propTypes = {
|
|
67
68
|
/**
|
|
68
69
|
* Provide a custom element type used to render the outermost node
|
|
@@ -15,7 +15,6 @@ var cx = require('classnames');
|
|
|
15
15
|
var PropTypes = require('prop-types');
|
|
16
16
|
var iconsReact = require('@carbon/icons-react');
|
|
17
17
|
var util = require('./util.js');
|
|
18
|
-
var warning = require('../../internal/warning.js');
|
|
19
18
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
20
19
|
var usePrefix = require('../../internal/usePrefix.js');
|
|
21
20
|
var useId = require('../../internal/useId.js');
|
|
@@ -27,7 +26,6 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
27
26
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
28
27
|
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
29
28
|
|
|
30
|
-
let didWarnAboutDeprecation = false;
|
|
31
29
|
const ControlledPasswordInput = /*#__PURE__*/React__default["default"].forwardRef(function ControlledPasswordInput(_ref, ref) {
|
|
32
30
|
let {
|
|
33
31
|
labelText,
|
|
@@ -55,10 +53,6 @@ const ControlledPasswordInput = /*#__PURE__*/React__default["default"].forwardRe
|
|
|
55
53
|
} = _ref;
|
|
56
54
|
const prefix = usePrefix.usePrefix();
|
|
57
55
|
const controlledPasswordInstanceId = useId.useId();
|
|
58
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
59
|
-
process.env.NODE_ENV !== "production" ? warning.warning(didWarnAboutDeprecation, '`<TextInput.ControlledPasswordInput>` has been deprecated in favor of `<TextInput.PasswordInput />` and will be removed in the next major release of `carbon-components-react`') : void 0;
|
|
60
|
-
didWarnAboutDeprecation = true;
|
|
61
|
-
}
|
|
62
56
|
const errorId = id + '-error-msg';
|
|
63
57
|
const textInputClasses = cx__default["default"](`${prefix}--text-input`, `${prefix}--password-input`, className, {
|
|
64
58
|
[`${prefix}--text-input--light`]: light,
|
|
@@ -13,8 +13,6 @@ var PropTypes = require('prop-types');
|
|
|
13
13
|
var React = require('react');
|
|
14
14
|
var cx = require('classnames');
|
|
15
15
|
var useNormalizedInputProps = require('../../internal/useNormalizedInputProps.js');
|
|
16
|
-
var PasswordInput = require('./PasswordInput.js');
|
|
17
|
-
var ControlledPasswordInput = require('./ControlledPasswordInput.js');
|
|
18
16
|
var deprecate = require('../../prop-types/deprecate.js');
|
|
19
17
|
var util = require('./util.js');
|
|
20
18
|
require('../FluidForm/FluidForm.js');
|
|
@@ -222,8 +220,6 @@ const TextInput = /*#__PURE__*/React__default["default"].forwardRef(function Tex
|
|
|
222
220
|
}), isFluid && !inline && normalizedProps.validation), !isFluid && !inline && (normalizedProps.validation || helper)));
|
|
223
221
|
});
|
|
224
222
|
TextInput.displayName = 'TextInput';
|
|
225
|
-
TextInput.PasswordInput = PasswordInput["default"];
|
|
226
|
-
TextInput.ControlledPasswordInput = ControlledPasswordInput["default"];
|
|
227
223
|
TextInput.propTypes = {
|
|
228
224
|
/**
|
|
229
225
|
* Specify an optional className to be applied to the `<input>` node
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
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
|
+
*/
|
|
1
7
|
import TextInput, { type TextInputProps } from './TextInput';
|
|
2
8
|
import { type TextInputSkeletonProps } from './TextInput.Skeleton';
|
|
3
9
|
export { default as TextInputSkeleton } from './TextInput.Skeleton';
|
|
@@ -9,16 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
|
-
var deprecateFieldOnObject = require('../../internal/deprecateFieldOnObject.js');
|
|
13
|
-
var ControlledPasswordInput = require('./ControlledPasswordInput.js');
|
|
14
|
-
var PasswordInput = require('./PasswordInput.js');
|
|
15
12
|
var TextInput = require('./TextInput.js');
|
|
16
13
|
var TextInput_Skeleton = require('./TextInput.Skeleton.js');
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
deprecateFieldOnObject.deprecateFieldOnObject(TextInput["default"], 'ControlledPasswordInput', ControlledPasswordInput["default"]);
|
|
20
|
-
deprecateFieldOnObject.deprecateFieldOnObject(TextInput["default"], 'PasswordInput', PasswordInput["default"]);
|
|
21
|
-
}
|
|
15
|
+
|
|
22
16
|
|
|
23
17
|
exports.TextInput = TextInput["default"];
|
|
24
18
|
exports["default"] = TextInput["default"];
|
|
@@ -213,7 +213,6 @@ ClickableTile.propTypes = {
|
|
|
213
213
|
/**
|
|
214
214
|
* A component used to render an icon.
|
|
215
215
|
*/
|
|
216
|
-
// @ts-expect-error: Invalid derived prop type, seemingly no real solution.
|
|
217
216
|
renderIcon: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].object])
|
|
218
217
|
};
|
|
219
218
|
const SelectableTile = /*#__PURE__*/React__default["default"].forwardRef(function SelectableTile(_ref3, ref) {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import React, { type KeyboardEventHandler, type MouseEventHandler } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
|
-
type ExcludedAttributes = 'aria-labelledby' | 'aria-checked' | 'type' | 'role' | 'id' | 'size' | 'onClick';
|
|
9
|
+
type ExcludedAttributes = 'aria-labelledby' | 'aria-checked' | 'type' | 'role' | 'id' | 'size' | 'onClick' | 'onToggle';
|
|
10
10
|
export interface ToggleProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, ExcludedAttributes> {
|
|
11
11
|
/**
|
|
12
12
|
* Specify another element's id to be used as the label for this toggle
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Copyright IBM Corp. 2016,
|
|
2
|
+
* Copyright IBM Corp. 2016, 2025
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
8
|
-
import React from 'react';
|
|
9
8
|
export interface ToggleSmallSkeletonProps {
|
|
10
9
|
['aria-label']: string;
|
|
11
10
|
/**
|
|
@@ -18,14 +17,14 @@ export interface ToggleSmallSkeletonProps {
|
|
|
18
17
|
id?: string;
|
|
19
18
|
/**
|
|
20
19
|
* Provide the text that will be read by a screen reader when visiting this
|
|
21
|
-
* control
|
|
22
|
-
*
|
|
23
|
-
* provided
|
|
20
|
+
* control. `aria-label` is always required but will be `null` if `labelText`
|
|
21
|
+
* is also provided.
|
|
24
22
|
*/
|
|
25
23
|
labelText?: string;
|
|
26
24
|
}
|
|
27
|
-
declare
|
|
28
|
-
|
|
25
|
+
export declare const ToggleSmallSkeleton: {
|
|
26
|
+
({ id, labelText, className, ...rest }: ToggleSmallSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
propTypes: {
|
|
29
28
|
"aria-label": PropTypes.Validator<string>;
|
|
30
29
|
/**
|
|
31
30
|
* Specify an optional className to add to the form item wrapper.
|
|
@@ -37,13 +36,9 @@ declare class ToggleSmallSkeleton extends React.Component<ToggleSmallSkeletonPro
|
|
|
37
36
|
id: PropTypes.Requireable<string>;
|
|
38
37
|
/**
|
|
39
38
|
* Provide the text that will be read by a screen reader when visiting this
|
|
40
|
-
* control
|
|
41
|
-
*
|
|
42
|
-
* provided
|
|
39
|
+
* control. `aria-label` is always required but will be `null` if `labelText`
|
|
40
|
+
* is also provided.
|
|
43
41
|
*/
|
|
44
42
|
labelText: PropTypes.Requireable<string>;
|
|
45
43
|
};
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
export default ToggleSmallSkeleton;
|
|
49
|
-
export { ToggleSmallSkeleton };
|
|
44
|
+
};
|
|
@@ -22,40 +22,37 @@ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
|
22
22
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
23
23
|
|
|
24
24
|
var _path;
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
_rollupPluginBabelHelpers.defineProperty(ToggleSmallSkeleton, "propTypes", {
|
|
25
|
+
const ToggleSmallSkeleton = _ref => {
|
|
26
|
+
let {
|
|
27
|
+
id,
|
|
28
|
+
labelText,
|
|
29
|
+
className,
|
|
30
|
+
...rest
|
|
31
|
+
} = _ref;
|
|
32
|
+
const prefix = React.useContext(usePrefix.PrefixContext);
|
|
33
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _rollupPluginBabelHelpers["extends"]({
|
|
34
|
+
className: cx__default["default"](`${prefix}--form-item`, className)
|
|
35
|
+
}, rest), /*#__PURE__*/React__default["default"].createElement("input", {
|
|
36
|
+
type: "checkbox",
|
|
37
|
+
id: id,
|
|
38
|
+
className: `${prefix}--toggle ${prefix}--toggle--small ${prefix}--skeleton`
|
|
39
|
+
}), /*#__PURE__*/React__default["default"].createElement("label", {
|
|
40
|
+
className: `${prefix}--toggle__label ${prefix}--skeleton`,
|
|
41
|
+
htmlFor: id
|
|
42
|
+
}, labelText && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
43
|
+
className: `${prefix}--toggle__label-text`
|
|
44
|
+
}, labelText), /*#__PURE__*/React__default["default"].createElement("span", {
|
|
45
|
+
className: `${prefix}--toggle__appearance`
|
|
46
|
+
}, /*#__PURE__*/React__default["default"].createElement("svg", {
|
|
47
|
+
className: `${prefix}--toggle__check`,
|
|
48
|
+
width: "6px",
|
|
49
|
+
height: "5px",
|
|
50
|
+
viewBox: "0 0 6 5"
|
|
51
|
+
}, _path || (_path = /*#__PURE__*/React__default["default"].createElement("path", {
|
|
52
|
+
d: "M2.2403 2.7299L4.9245 0 6 1.1117 2.2384 5 0 2.6863 1.0612 1.511z"
|
|
53
|
+
}))))));
|
|
54
|
+
};
|
|
55
|
+
ToggleSmallSkeleton.propTypes = {
|
|
59
56
|
['aria-label']: PropTypes__default["default"].string.isRequired,
|
|
60
57
|
/**
|
|
61
58
|
* Specify an optional className to add to the form item wrapper.
|
|
@@ -67,12 +64,10 @@ _rollupPluginBabelHelpers.defineProperty(ToggleSmallSkeleton, "propTypes", {
|
|
|
67
64
|
id: PropTypes__default["default"].string,
|
|
68
65
|
/**
|
|
69
66
|
* Provide the text that will be read by a screen reader when visiting this
|
|
70
|
-
* control
|
|
71
|
-
*
|
|
72
|
-
* provided
|
|
67
|
+
* control. `aria-label` is always required but will be `null` if `labelText`
|
|
68
|
+
* is also provided.
|
|
73
69
|
*/
|
|
74
70
|
labelText: PropTypes__default["default"].string
|
|
75
|
-
}
|
|
71
|
+
};
|
|
76
72
|
|
|
77
73
|
exports.ToggleSmallSkeleton = ToggleSmallSkeleton;
|
|
78
|
-
exports["default"] = ToggleSmallSkeleton;
|
|
@@ -137,8 +137,11 @@ function Toggletip(_ref2) {
|
|
|
137
137
|
actions.close();
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
|
-
useEvent.useWindowEvent('click',
|
|
141
|
-
|
|
140
|
+
useEvent.useWindowEvent('click', _ref3 => {
|
|
141
|
+
let {
|
|
142
|
+
target
|
|
143
|
+
} = _ref3;
|
|
144
|
+
if (open && target instanceof Node && !ref.current?.contains(target)) {
|
|
142
145
|
actions.close();
|
|
143
146
|
}
|
|
144
147
|
});
|
|
@@ -216,14 +219,14 @@ Toggletip.propTypes = {
|
|
|
216
219
|
* clicks and keyboard interactions.
|
|
217
220
|
*/
|
|
218
221
|
|
|
219
|
-
const ToggletipButton = /*#__PURE__*/React__default["default"].forwardRef(function ToggletipButton(
|
|
222
|
+
const ToggletipButton = /*#__PURE__*/React__default["default"].forwardRef(function ToggletipButton(_ref4, ref) {
|
|
220
223
|
let {
|
|
221
224
|
children,
|
|
222
225
|
className: customClassName,
|
|
223
226
|
label = 'Show information',
|
|
224
227
|
as: BaseComponent,
|
|
225
228
|
...rest
|
|
226
|
-
} =
|
|
229
|
+
} = _ref4;
|
|
227
230
|
const toggletip = useToggletip();
|
|
228
231
|
const prefix = usePrefix.usePrefix();
|
|
229
232
|
const className = cx__default["default"](`${prefix}--toggletip-button`, customClassName);
|
|
@@ -261,11 +264,11 @@ ToggletipButton.displayName = 'ToggletipButton';
|
|
|
261
264
|
* `children` passed in as a prop inside of `PopoverContent` so that they will
|
|
262
265
|
* be rendered inside of the popover for this component.
|
|
263
266
|
*/
|
|
264
|
-
const ToggletipContent = /*#__PURE__*/React__default["default"].forwardRef(function ToggletipContent(
|
|
267
|
+
const ToggletipContent = /*#__PURE__*/React__default["default"].forwardRef(function ToggletipContent(_ref5, ref) {
|
|
265
268
|
let {
|
|
266
269
|
children,
|
|
267
270
|
className: customClassName
|
|
268
|
-
} =
|
|
271
|
+
} = _ref5;
|
|
269
272
|
const toggletip = useToggletip();
|
|
270
273
|
const prefix = usePrefix.usePrefix();
|
|
271
274
|
return /*#__PURE__*/React__default["default"].createElement(index.PopoverContent, _rollupPluginBabelHelpers["extends"]({
|
|
@@ -293,11 +296,11 @@ ToggletipContent.displayName = 'ToggletipContent';
|
|
|
293
296
|
* `ToggletipActions` is a container for one or two actions present at the base
|
|
294
297
|
* of a toggletip. It is used for layout of these items.
|
|
295
298
|
*/
|
|
296
|
-
function ToggletipActions(
|
|
299
|
+
function ToggletipActions(_ref6) {
|
|
297
300
|
let {
|
|
298
301
|
children,
|
|
299
302
|
className: customClassName
|
|
300
|
-
} =
|
|
303
|
+
} = _ref6;
|
|
301
304
|
const prefix = usePrefix.usePrefix();
|
|
302
305
|
const className = cx__default["default"](`${prefix}--toggletip-actions`, customClassName);
|
|
303
306
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
|
-
import React from 'react';
|
|
7
|
+
import React, { type JSX } from 'react';
|
|
8
8
|
import TreeNode, { TreeNodeProps } from './TreeNode';
|
|
9
9
|
export type TreeViewProps = {
|
|
10
10
|
/**
|