@carbon/react 1.90.0 → 1.91.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 +986 -926
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.d.ts +27 -2
- package/es/components/Breadcrumb/Breadcrumb.Skeleton.js +27 -4
- package/es/components/Breadcrumb/Breadcrumb.js +2 -1
- package/es/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/es/components/CodeSnippet/CodeSnippet.js +1 -1
- package/es/components/ComboBox/ComboBox.js +1 -12
- package/es/components/ComboButton/index.js +1 -1
- package/es/components/ComposedModal/ComposedModal.js +1 -1
- package/es/components/ContentSwitcher/ContentSwitcher.js +2 -2
- package/es/components/Copy/Copy.d.ts +1 -1
- package/es/components/Copy/Copy.js +1 -1
- package/es/components/CopyButton/CopyButton.d.ts +1 -1
- package/es/components/CopyButton/CopyButton.js +1 -1
- package/es/components/DataTable/DataTable.d.ts +60 -15
- package/es/components/DataTable/DataTable.js +106 -179
- package/es/components/DataTable/Table.d.ts +2 -2
- package/es/components/DataTable/Table.js +1 -1
- package/es/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/es/components/DataTable/TableExpandHeader.js +1 -1
- package/es/components/DatePicker/DatePicker.d.ts +0 -12
- package/es/components/DatePicker/DatePicker.js +3 -3
- package/es/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
- package/es/components/DatePicker/plugins/rangePlugin.js +18 -14
- package/es/components/Dropdown/Dropdown.js +1 -12
- package/es/components/FeatureFlags/index.js +1 -0
- package/es/components/IconButton/index.js +1 -1
- package/es/components/Menu/MenuItem.d.ts +1 -1
- package/es/components/Menu/MenuItem.js +5 -5
- package/es/components/Modal/Modal.js +1 -1
- package/es/components/MultiSelect/FilterableMultiSelect.js +1 -1
- package/es/components/MultiSelect/MultiSelect.js +1 -12
- package/es/components/Notification/Notification.d.ts +6 -6
- package/es/components/Notification/Notification.js +6 -6
- package/es/components/OverflowMenu/OverflowMenu.js +1 -1
- package/es/components/OverflowMenu/next/index.js +1 -1
- package/es/components/PaginationNav/PaginationNav.d.ts +20 -0
- package/es/components/PaginationNav/PaginationNav.js +34 -5
- package/es/components/Popover/index.js +1 -1
- package/es/components/Search/Search.d.ts +4 -2
- package/es/components/Search/Search.js +5 -4
- package/es/components/Slider/Slider.d.ts +144 -188
- package/es/components/Slider/Slider.js +787 -710
- package/es/components/Slider/index.d.ts +2 -2
- package/es/components/Tabs/Tabs.d.ts +4 -0
- package/es/components/TextArea/TextArea.js +13 -6
- package/es/components/TextInput/ControlledPasswordInput.js +2 -2
- package/es/components/TextInput/PasswordInput.js +2 -2
- package/es/components/TextInput/TextInput.js +2 -2
- package/es/components/TextInput/util.d.ts +17 -5
- package/es/components/TextInput/util.js +2 -7
- package/es/components/UIShell/HeaderPanel.d.ts +1 -1
- package/es/index.d.ts +27 -24
- package/es/index.js +43 -41
- package/es/internal/defaultItemToString.d.ts +7 -0
- package/es/internal/defaultItemToString.js +17 -0
- package/es/internal/index.d.ts +1 -0
- package/es/prop-types/deprecateValuesWithin.d.ts +8 -1
- package/es/prop-types/deprecateValuesWithin.js +6 -6
- package/es/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
- package/es/prop-types/requiredIfGivenPropIsTruthy.js +10 -10
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.d.ts +27 -2
- package/lib/components/Breadcrumb/Breadcrumb.Skeleton.js +27 -4
- package/lib/components/Breadcrumb/Breadcrumb.js +2 -1
- package/lib/components/CodeSnippet/CodeSnippet.d.ts +1 -1
- package/lib/components/CodeSnippet/CodeSnippet.js +1 -1
- package/lib/components/ComboBox/ComboBox.js +3 -14
- package/lib/components/ComboButton/index.js +1 -1
- package/lib/components/ComposedModal/ComposedModal.js +1 -1
- package/lib/components/ContentSwitcher/ContentSwitcher.js +1 -1
- package/lib/components/Copy/Copy.d.ts +1 -1
- package/lib/components/Copy/Copy.js +1 -1
- package/lib/components/CopyButton/CopyButton.d.ts +1 -1
- package/lib/components/CopyButton/CopyButton.js +1 -1
- package/lib/components/DataTable/DataTable.d.ts +60 -15
- package/lib/components/DataTable/DataTable.js +106 -179
- package/lib/components/DataTable/Table.d.ts +2 -2
- package/lib/components/DataTable/Table.js +1 -1
- package/lib/components/DataTable/TableExpandHeader.d.ts +1 -1
- package/lib/components/DataTable/TableExpandHeader.js +3 -3
- package/lib/components/DatePicker/DatePicker.d.ts +0 -12
- package/lib/components/DatePicker/DatePicker.js +2 -2
- package/lib/components/DatePicker/plugins/rangePlugin.d.ts +19 -2
- package/lib/components/DatePicker/plugins/rangePlugin.js +18 -16
- package/lib/components/Dropdown/Dropdown.js +3 -14
- package/lib/components/FeatureFlags/index.js +1 -0
- package/lib/components/IconButton/index.js +1 -1
- package/lib/components/Menu/MenuItem.d.ts +1 -1
- package/lib/components/Menu/MenuItem.js +6 -6
- package/lib/components/Modal/Modal.js +1 -1
- package/lib/components/MultiSelect/FilterableMultiSelect.js +8 -8
- package/lib/components/MultiSelect/MultiSelect.js +2 -13
- package/lib/components/Notification/Notification.d.ts +6 -6
- package/lib/components/Notification/Notification.js +6 -6
- package/lib/components/OverflowMenu/OverflowMenu.js +1 -1
- package/lib/components/OverflowMenu/next/index.js +1 -1
- package/lib/components/PaginationNav/PaginationNav.d.ts +20 -0
- package/lib/components/PaginationNav/PaginationNav.js +34 -5
- package/lib/components/Popover/index.js +1 -1
- package/lib/components/Search/Search.d.ts +4 -2
- package/lib/components/Search/Search.js +5 -4
- package/lib/components/Slider/Slider.d.ts +144 -188
- package/lib/components/Slider/Slider.js +784 -709
- package/lib/components/Slider/index.d.ts +2 -2
- package/lib/components/Tabs/Tabs.d.ts +4 -0
- package/lib/components/TextArea/TextArea.js +13 -6
- package/lib/components/TextInput/ControlledPasswordInput.js +1 -1
- package/lib/components/TextInput/PasswordInput.js +1 -1
- package/lib/components/TextInput/TextInput.js +1 -1
- package/lib/components/TextInput/util.d.ts +17 -5
- package/lib/components/TextInput/util.js +2 -7
- package/lib/components/UIShell/HeaderPanel.d.ts +1 -1
- package/lib/index.d.ts +27 -24
- package/lib/index.js +95 -28
- package/lib/internal/defaultItemToString.d.ts +7 -0
- package/lib/internal/defaultItemToString.js +19 -0
- package/lib/internal/index.d.ts +1 -0
- package/lib/prop-types/deprecateValuesWithin.d.ts +8 -1
- package/lib/prop-types/deprecateValuesWithin.js +6 -8
- package/lib/prop-types/requiredIfGivenPropIsTruthy.d.ts +8 -7
- package/lib/prop-types/requiredIfGivenPropIsTruthy.js +10 -12
- package/package.json +8 -7
- package/telemetry.yml +1 -2
- package/es/components/MultiSelect/tools/itemToString.d.ts +0 -1
- package/es/components/MultiSelect/tools/itemToString.js +0 -21
- package/es/components/Slider/index.js +0 -14
- package/es/internal/createClassWrapper.js +0 -23
- package/lib/components/MultiSelect/tools/itemToString.d.ts +0 -1
- package/lib/components/MultiSelect/tools/itemToString.js +0 -23
- package/lib/components/Slider/index.js +0 -20
- package/lib/internal/createClassWrapper.js +0 -25
|
@@ -1,10 +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 { Slider } from './Slider';
|
|
8
8
|
export { default as SliderSkeleton } from './Slider.Skeleton';
|
|
9
9
|
export default Slider;
|
|
10
10
|
export { Slider };
|
|
@@ -367,6 +367,10 @@ export interface IconTabProps extends DivAttributes {
|
|
|
367
367
|
* Specify whether the tooltip for the icon should be open when it first renders
|
|
368
368
|
*/
|
|
369
369
|
defaultOpen?: boolean;
|
|
370
|
+
/**
|
|
371
|
+
* Specify whether your IconTab is disabled.
|
|
372
|
+
*/
|
|
373
|
+
disabled?: boolean;
|
|
370
374
|
/**
|
|
371
375
|
* Specify the duration in milliseconds to delay before displaying the tooltip for the icon.
|
|
372
376
|
*/
|
|
@@ -80,19 +80,26 @@ const TextArea = frFn((props, forwardRef) => {
|
|
|
80
80
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
81
81
|
}, [value, defaultValue, counterMode]);
|
|
82
82
|
useIsomorphicEffect(() => {
|
|
83
|
-
const measuredWidth = wrapperRef.current?.scrollWidth;
|
|
84
83
|
if (other.cols && textareaRef.current) {
|
|
85
84
|
textareaRef.current.style.width = '';
|
|
86
85
|
textareaRef.current.style.resize = 'none';
|
|
87
86
|
} else if (textareaRef.current) {
|
|
88
87
|
textareaRef.current.style.width = `100%`;
|
|
89
88
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
r.current
|
|
94
|
-
|
|
89
|
+
if (!wrapperRef.current) return;
|
|
90
|
+
const applyWidth = width => {
|
|
91
|
+
[helperTextRef, errorTextRef, warnTextRef].forEach(r => {
|
|
92
|
+
if (r.current) {
|
|
93
|
+
r.current.style.maxWidth = `${width}px`;
|
|
94
|
+
r.current.style.overflowWrap = 'break-word';
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
const resizeObserver = new ResizeObserver(([entry]) => {
|
|
99
|
+
applyWidth(entry.contentRect.width);
|
|
95
100
|
});
|
|
101
|
+
resizeObserver.observe(wrapperRef.current);
|
|
102
|
+
return () => resizeObserver && resizeObserver.disconnect();
|
|
96
103
|
}, [other.cols, invalid, warn]);
|
|
97
104
|
const textareaProps = {
|
|
98
105
|
id,
|
|
@@ -10,7 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { WarningFilled, ViewOff, View } from '@carbon/icons-react';
|
|
13
|
-
import {
|
|
13
|
+
import { getTextInputProps } from './util.js';
|
|
14
14
|
import { deprecate } from '../../prop-types/deprecate.js';
|
|
15
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
16
|
import { useId } from '../../internal/useId.js';
|
|
@@ -90,7 +90,7 @@ const ControlledPasswordInput = /*#__PURE__*/React.forwardRef(({
|
|
|
90
90
|
[`${prefix}--tooltip--align-${tooltipAlignment}`]: tooltipAlignment
|
|
91
91
|
});
|
|
92
92
|
const helperId = !helperText ? undefined : `controlled-password-helper-text-${controlledPasswordInstanceId}`;
|
|
93
|
-
const input = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({},
|
|
93
|
+
const input = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({}, getTextInputProps({
|
|
94
94
|
invalid,
|
|
95
95
|
sharedTextInputProps,
|
|
96
96
|
invalidId: errorId,
|
|
@@ -11,7 +11,7 @@ import cx from 'classnames';
|
|
|
11
11
|
import PropTypes from 'prop-types';
|
|
12
12
|
import { ViewOff, View } from '@carbon/icons-react';
|
|
13
13
|
import { useNormalizedInputProps } from '../../internal/useNormalizedInputProps.js';
|
|
14
|
-
import {
|
|
14
|
+
import { getTextInputProps } from './util.js';
|
|
15
15
|
import '../FluidForm/FluidForm.js';
|
|
16
16
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
17
17
|
import '../Tooltip/DefinitionTooltip.js';
|
|
@@ -157,7 +157,7 @@ const PasswordInput = /*#__PURE__*/React.forwardRef(({
|
|
|
157
157
|
// eslint-disable-next-line no-console -- https://github.com/carbon-design-system/carbon/issues/20071
|
|
158
158
|
console.warn('Warning: The "showPasswordLabel" should not be blank.');
|
|
159
159
|
}
|
|
160
|
-
const input = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({},
|
|
160
|
+
const input = /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("input", _extends({}, getTextInputProps({
|
|
161
161
|
sharedTextInputProps,
|
|
162
162
|
invalid: normalizedProps.invalid,
|
|
163
163
|
invalidId: normalizedProps.invalidId,
|
|
@@ -10,7 +10,7 @@ import React, { useRef, useState, useEffect, useContext, cloneElement } from 're
|
|
|
10
10
|
import cx from 'classnames';
|
|
11
11
|
import { useNormalizedInputProps } from '../../internal/useNormalizedInputProps.js';
|
|
12
12
|
import { deprecate } from '../../prop-types/deprecate.js';
|
|
13
|
-
import {
|
|
13
|
+
import { getTextInputProps } from './util.js';
|
|
14
14
|
import '../FluidForm/FluidForm.js';
|
|
15
15
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
16
16
|
import { useMergedRefs } from '../../internal/useMergedRefs.js';
|
|
@@ -154,7 +154,7 @@ const TextInput = /*#__PURE__*/React.forwardRef(({
|
|
|
154
154
|
id: normalizedProps.helperId,
|
|
155
155
|
className: helperTextClasses
|
|
156
156
|
}, helperText) : null;
|
|
157
|
-
const input = /*#__PURE__*/React.createElement("input",
|
|
157
|
+
const input = /*#__PURE__*/React.createElement("input", getTextInputProps({
|
|
158
158
|
sharedTextInputProps,
|
|
159
159
|
invalid: normalizedProps.invalid,
|
|
160
160
|
invalidId: normalizedProps.invalidId,
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 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
|
+
*/
|
|
7
|
+
interface TextInputPropsConfig {
|
|
8
|
+
sharedTextInputProps: Record<string, unknown>;
|
|
9
|
+
invalid: boolean;
|
|
10
|
+
invalidId: string;
|
|
5
11
|
warn?: boolean;
|
|
6
12
|
warnId?: string;
|
|
7
13
|
hasHelper?: boolean;
|
|
8
14
|
helperId?: string;
|
|
9
|
-
}
|
|
15
|
+
}
|
|
16
|
+
export declare const getTextInputProps: ({ sharedTextInputProps, invalid, invalidId, warn, warnId, hasHelper, helperId, }: TextInputPropsConfig) => {
|
|
17
|
+
'aria-describedby'?: string | undefined;
|
|
18
|
+
'data-invalid'?: boolean | undefined;
|
|
19
|
+
'aria-invalid'?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -16,12 +16,7 @@ const warnProps = warnId => ({
|
|
|
16
16
|
const helperProps = helperId => ({
|
|
17
17
|
'aria-describedby': helperId
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
/**
|
|
21
|
-
* @param {{sharedTextInputProps: object, invalid?: boolean, invalidId?: string, warn?: boolean, warnId?: string, hasHelper?: boolean, helperId?: string}} config
|
|
22
|
-
* @returns {object}
|
|
23
|
-
*/
|
|
24
|
-
const textInputProps = ({
|
|
19
|
+
const getTextInputProps = ({
|
|
25
20
|
sharedTextInputProps,
|
|
26
21
|
invalid,
|
|
27
22
|
invalidId,
|
|
@@ -36,4 +31,4 @@ const textInputProps = ({
|
|
|
36
31
|
...(hasHelper ? helperProps(helperId) : {})
|
|
37
32
|
});
|
|
38
33
|
|
|
39
|
-
export {
|
|
34
|
+
export { getTextInputProps };
|
|
@@ -32,5 +32,5 @@ export interface HeaderPanelProps {
|
|
|
32
32
|
*/
|
|
33
33
|
onHeaderPanelFocus?: () => void;
|
|
34
34
|
}
|
|
35
|
-
declare const HeaderPanel: React.
|
|
35
|
+
declare const HeaderPanel: React.ForwardRefExoticComponent<HeaderPanelProps & React.RefAttributes<HTMLDivElement>>;
|
|
36
36
|
export default HeaderPanel;
|
package/es/index.d.ts
CHANGED
|
@@ -33,7 +33,10 @@ export * from './components/ErrorBoundary';
|
|
|
33
33
|
export * from './components/ExpandableSearch';
|
|
34
34
|
export { FeatureFlags, useFeatureFlag, useFeatureFlags, FeatureFlags as unstable_FeatureFlags, // this export can be removed in v12
|
|
35
35
|
useFeatureFlag as unstable_useFeatureFlag, // this export can be removed in v12
|
|
36
|
-
useFeatureFlags as unstable_useFeatureFlags,
|
|
36
|
+
useFeatureFlags as unstable_useFeatureFlags, // this export can be removed in v12
|
|
37
|
+
FeatureFlags as preview_FeatureFlags, // this export can be removed in v12
|
|
38
|
+
useFeatureFlag as preview_useFeatureFlag, // this export can be removed in v12
|
|
39
|
+
useFeatureFlags as preview_useFeatureFlags, } from './components/FeatureFlags';
|
|
37
40
|
export * from './components/FileUploader';
|
|
38
41
|
export * from './components/FluidForm';
|
|
39
42
|
export * from './components/Form';
|
|
@@ -58,6 +61,7 @@ export * from './components/OrderedList';
|
|
|
58
61
|
export * from './components/OverflowMenu';
|
|
59
62
|
export * from './components/OverflowMenuItem';
|
|
60
63
|
export * as unstable__PageHeader from './components/PageHeader';
|
|
64
|
+
export * as preview__PageHeader from './components/PageHeader';
|
|
61
65
|
export * as preview__Dialog from './components/Dialog';
|
|
62
66
|
export * from './components/Pagination';
|
|
63
67
|
export * from './components/Pagination/Pagination.Skeleton';
|
|
@@ -99,37 +103,36 @@ export * from './components/Toggletip';
|
|
|
99
103
|
export * from './components/TreeView';
|
|
100
104
|
export * from './components/UIShell';
|
|
101
105
|
export * from './components/UnorderedList';
|
|
102
|
-
export { FluidComboBox as unstable__FluidComboBox, FluidComboBoxSkeleton as unstable__FluidComboBoxSkeleton, } from './components/FluidComboBox';
|
|
103
|
-
export { FluidDatePicker as unstable__FluidDatePicker, FluidDatePickerSkeleton as unstable__FluidDatePickerSkeleton, } from './components/FluidDatePicker';
|
|
104
|
-
export { FluidDatePickerInput as unstable__FluidDatePickerInput } from './components/FluidDatePickerInput';
|
|
105
|
-
export { FluidDropdown as unstable__FluidDropdown, FluidDropdownSkeleton as unstable__FluidDropdownSkeleton, } from './components/FluidDropdown';
|
|
106
|
-
export { FluidMultiSelect as unstable__FluidMultiSelect, FluidMultiSelectSkeleton as unstable__FluidMultiSelectSkeleton, } from './components/FluidMultiSelect';
|
|
107
|
-
export { FluidSelect as unstable__FluidSelect, FluidSelectSkeleton as unstable__FluidSelectSkeleton, } from './components/FluidSelect';
|
|
108
|
-
export { FluidSearch as unstable__FluidSearch, FluidSearchSkeleton as unstable__FluidSearchSkeleton, } from './components/FluidSearch';
|
|
109
|
-
export { FluidTextArea as unstable__FluidTextArea, FluidTextAreaSkeleton as unstable__FluidTextAreaSkeleton, } from './components/FluidTextArea';
|
|
110
|
-
export { FluidTextInput as unstable__FluidTextInput, FluidTextInputSkeleton as unstable__FluidTextInputSkeleton, } from './components/FluidTextInput';
|
|
111
|
-
export { FluidNumberInput as unstable__FluidNumberInput, FluidNumberInputSkeleton as unstable__FluidNumberInputSkeleton, } from './components/FluidNumberInput';
|
|
112
|
-
export { FluidTimePicker as unstable__FluidTimePicker, FluidTimePickerSkeleton as unstable__FluidTimePickerSkeleton, } from './components/FluidTimePicker';
|
|
113
|
-
export { FluidTimePickerSelect as unstable__FluidTimePickerSelect } from './components/FluidTimePickerSelect';
|
|
106
|
+
export { FluidComboBox, FluidComboBoxSkeleton, FluidComboBox as unstable__FluidComboBox, FluidComboBoxSkeleton as unstable__FluidComboBoxSkeleton, FluidComboBox as preview__FluidComboBox, FluidComboBoxSkeleton as preview__FluidComboBoxSkeleton, } from './components/FluidComboBox';
|
|
107
|
+
export { FluidDatePicker, FluidDatePickerSkeleton, FluidDatePicker as unstable__FluidDatePicker, FluidDatePickerSkeleton as unstable__FluidDatePickerSkeleton, FluidDatePicker as preview__FluidDatePicker, FluidDatePickerSkeleton as preview__FluidDatePickerSkeleton, } from './components/FluidDatePicker';
|
|
108
|
+
export { FluidDatePickerInput, FluidDatePickerInput as unstable__FluidDatePickerInput, FluidDatePickerInput as preview__FluidDatePickerInput, } from './components/FluidDatePickerInput';
|
|
109
|
+
export { FluidDropdown, FluidDropdownSkeleton, FluidDropdown as unstable__FluidDropdown, FluidDropdownSkeleton as unstable__FluidDropdownSkeleton, FluidDropdown as preview__FluidDropdown, FluidDropdownSkeleton as preview__FluidDropdownSkeleton, } from './components/FluidDropdown';
|
|
110
|
+
export { FluidMultiSelect, FluidMultiSelectSkeleton, FluidMultiSelect as unstable__FluidMultiSelect, FluidMultiSelectSkeleton as unstable__FluidMultiSelectSkeleton, FluidMultiSelect as preview__FluidMultiSelect, FluidMultiSelectSkeleton as preview__FluidMultiSelectSkeleton, } from './components/FluidMultiSelect';
|
|
111
|
+
export { FluidSelect, FluidSelectSkeleton, FluidSelect as unstable__FluidSelect, FluidSelectSkeleton as unstable__FluidSelectSkeleton, FluidSelect as preview__FluidSelect, FluidSelectSkeleton as preview__FluidSelectSkeleton, } from './components/FluidSelect';
|
|
112
|
+
export { FluidSearch, FluidSearchSkeleton, FluidSearch as unstable__FluidSearch, FluidSearchSkeleton as unstable__FluidSearchSkeleton, FluidSearch as preview__FluidSearch, FluidSearchSkeleton as preview__FluidSearchSkeleton, } from './components/FluidSearch';
|
|
113
|
+
export { FluidTextArea, FluidTextAreaSkeleton, FluidTextArea as unstable__FluidTextArea, FluidTextAreaSkeleton as unstable__FluidTextAreaSkeleton, FluidTextArea as preview__FluidTextArea, FluidTextAreaSkeleton as preview__FluidTextAreaSkeleton, } from './components/FluidTextArea';
|
|
114
|
+
export { FluidTextInput, FluidTextInputSkeleton, FluidTextInput as unstable__FluidTextInput, FluidTextInputSkeleton as unstable__FluidTextInputSkeleton, FluidTextInput as preview__FluidTextInput, FluidTextInputSkeleton as preview__FluidTextInputSkeleton, } from './components/FluidTextInput';
|
|
115
|
+
export { FluidNumberInput, FluidNumberInputSkeleton, FluidNumberInput as unstable__FluidNumberInput, FluidNumberInputSkeleton as unstable__FluidNumberInputSkeleton, FluidNumberInput as preview__FluidNumberInput, FluidNumberInputSkeleton as preview__FluidNumberInputSkeleton, } from './components/FluidNumberInput';
|
|
116
|
+
export { FluidTimePicker, FluidTimePickerSkeleton, FluidTimePicker as unstable__FluidTimePicker, FluidTimePickerSkeleton as unstable__FluidTimePickerSkeleton, FluidTimePicker as preview__FluidTimePicker, FluidTimePickerSkeleton as preview__FluidTimePickerSkeleton, } from './components/FluidTimePicker';
|
|
117
|
+
export { FluidTimePickerSelect, FluidTimePickerSelect as unstable__FluidTimePickerSelect, FluidTimePickerSelect as preview__FluidTimePickerSelect, } from './components/FluidTimePickerSelect';
|
|
114
118
|
export * from './components/Heading';
|
|
115
119
|
export * from './components/IconButton';
|
|
116
120
|
export * from './components/Layer';
|
|
117
|
-
export { Layout as unstable_Layout } from './components/Layout';
|
|
118
|
-
export { LayoutDirection as unstable_LayoutDirection, useLayoutDirection as unstable_useLayoutDirection, } from './components/LayoutDirection';
|
|
119
|
-
export { OverflowMenuV2 as unstable_OverflowMenuV2 } from './components/OverflowMenuV2';
|
|
120
|
-
export { PageSelector as unstable_PageSelector, Pagination as unstable_Pagination, } from './components/Pagination/experimental';
|
|
121
|
+
export { Layout as unstable_Layout, Layout as preview_Layout, } from './components/Layout';
|
|
122
|
+
export { LayoutDirection as unstable_LayoutDirection, useLayoutDirection as unstable_useLayoutDirection, LayoutDirection as preview_LayoutDirection, useLayoutDirection as preview_useLayoutDirection, } from './components/LayoutDirection';
|
|
123
|
+
export { OverflowMenuV2 as unstable_OverflowMenuV2, OverflowMenuV2 as preview_OverflowMenuV2, } from './components/OverflowMenuV2';
|
|
124
|
+
export { PageSelector as unstable_PageSelector, Pagination as unstable_Pagination, PageSelector as preview_PageSelector, Pagination as preview_Pagination, } from './components/Pagination/experimental';
|
|
121
125
|
export * from './components/Popover';
|
|
122
126
|
export * from './components/ProgressBar';
|
|
123
127
|
export { AILabel, AILabelContent, AILabelActions } from './components/AILabel';
|
|
124
|
-
export { IconIndicator as unstable__IconIndicator } from './components/IconIndicator';
|
|
125
|
-
export { ShapeIndicator as unstable__ShapeIndicator } from './components/ShapeIndicator';
|
|
126
|
-
export { AILabel as unstable__Slug, AILabelContent as unstable__SlugContent, AILabelActions as unstable__SlugActions, } from './components/AILabel';
|
|
127
|
-
export { ChatButton as unstable__ChatButton, ChatButtonSkeleton as unstable__ChatButtonSkeleton, } from './components/ChatButton';
|
|
128
|
+
export { IconIndicator as unstable__IconIndicator, IconIndicator as preview__IconIndicator, } from './components/IconIndicator';
|
|
129
|
+
export { ShapeIndicator as unstable__ShapeIndicator, ShapeIndicator as preview__ShapeIndicator, } from './components/ShapeIndicator';
|
|
130
|
+
export { AILabel as unstable__Slug, AILabelContent as unstable__SlugContent, AILabelActions as unstable__SlugActions, AILabel as preview__Slug, AILabelContent as preview__SlugContent, AILabelActions as preview__SlugActions, } from './components/AILabel';
|
|
131
|
+
export { ChatButton as unstable__ChatButton, ChatButtonSkeleton as unstable__ChatButtonSkeleton, ChatButton as preview__ChatButton, ChatButtonSkeleton as preview__ChatButtonSkeleton, } from './components/ChatButton';
|
|
128
132
|
export { AISkeletonText, AISkeletonIcon, AISkeletonPlaceholder, } from './components/AISkeleton';
|
|
129
|
-
export { AISkeletonText as unstable__AiSkeletonText, AISkeletonIcon as unstable__AiSkeletonIcon, AISkeletonPlaceholder as unstable__AiSkeletonPlaceholder, } from './components/AISkeleton';
|
|
130
|
-
export * from './components/Stack';
|
|
133
|
+
export { AISkeletonText as unstable__AiSkeletonText, AISkeletonIcon as unstable__AiSkeletonIcon, AISkeletonPlaceholder as unstable__AiSkeletonPlaceholder, AISkeletonText as preview__AiSkeletonText, AISkeletonIcon as preview__AiSkeletonIcon, AISkeletonPlaceholder as preview__AiSkeletonPlaceholder, } from './components/AISkeleton';
|
|
131
134
|
export * from './components/Tooltip';
|
|
132
|
-
export { Text as unstable_Text, TextDirection as unstable_TextDirection, } from './components/Text';
|
|
135
|
+
export { Text as unstable_Text, TextDirection as unstable_TextDirection, Text as preview_Text, TextDirection as preview_TextDirection, } from './components/Text';
|
|
133
136
|
export * from './components/Tooltip/DefinitionTooltip';
|
|
134
137
|
export * from './components/Theme';
|
|
135
138
|
export * from './internal/usePrefix';
|
package/es/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
/**
|
|
2
3
|
* Copyright IBM Corp. 2016, 2023
|
|
3
4
|
*
|
|
@@ -65,7 +66,7 @@ export { default as DropdownSkeleton } from './components/Dropdown/Dropdown.Skel
|
|
|
65
66
|
export { default as ErrorBoundary } from './components/ErrorBoundary/ErrorBoundary.js';
|
|
66
67
|
export { ErrorBoundaryContext } from './components/ErrorBoundary/ErrorBoundaryContext.js';
|
|
67
68
|
export { default as ExpandableSearch } from './components/ExpandableSearch/ExpandableSearch.js';
|
|
68
|
-
export { FeatureFlags, FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags, useFeatureFlag, useFeatureFlags } from './components/FeatureFlags/index.js';
|
|
69
|
+
export { FeatureFlags, FeatureFlags as preview_FeatureFlags, useFeatureFlag as preview_useFeatureFlag, useFeatureFlags as preview_useFeatureFlags, FeatureFlags as unstable_FeatureFlags, useFeatureFlag as unstable_useFeatureFlag, useFeatureFlags as unstable_useFeatureFlags, useFeatureFlag, useFeatureFlags } from './components/FeatureFlags/index.js';
|
|
69
70
|
export { default as FileUploader } from './components/FileUploader/FileUploader.js';
|
|
70
71
|
export { default as Filename } from './components/FileUploader/Filename.js';
|
|
71
72
|
export { default as FileUploaderSkeleton } from './components/FileUploader/FileUploader.Skeleton.js';
|
|
@@ -104,6 +105,7 @@ export { default as OrderedList } from './components/OrderedList/OrderedList.js'
|
|
|
104
105
|
export { default as OverflowMenu } from './components/OverflowMenu/index.js';
|
|
105
106
|
export { default as OverflowMenuItem } from './components/OverflowMenuItem/OverflowMenuItem.js';
|
|
106
107
|
import * as index from './components/PageHeader/index.js';
|
|
108
|
+
export { index as preview__PageHeader };
|
|
107
109
|
export { index as unstable__PageHeader };
|
|
108
110
|
import * as index$1 from './components/Dialog/index.js';
|
|
109
111
|
export { index$1 as preview__Dialog };
|
|
@@ -129,7 +131,8 @@ export { default as SelectItemGroup } from './components/SelectItemGroup/SelectI
|
|
|
129
131
|
export { default as SkeletonIcon } from './components/SkeletonIcon/SkeletonIcon.js';
|
|
130
132
|
export { default as SkeletonPlaceholder } from './components/SkeletonPlaceholder/SkeletonPlaceholder.js';
|
|
131
133
|
export { default as SkeletonText } from './components/SkeletonText/SkeletonText.js';
|
|
132
|
-
export {
|
|
134
|
+
export { Slider } from './components/Slider/Slider.js';
|
|
135
|
+
export { default as SliderSkeleton } from './components/Slider/Slider.Skeleton.js';
|
|
133
136
|
export { HStack } from './components/Stack/HStack.js';
|
|
134
137
|
export { Stack } from './components/Stack/Stack.js';
|
|
135
138
|
export { VStack } from './components/Stack/VStack.js';
|
|
@@ -189,56 +192,55 @@ export { default as SideNavMenu } from './components/UIShell/SideNavMenu.js';
|
|
|
189
192
|
export { default as SideNavMenuItem } from './components/UIShell/SideNavMenuItem.js';
|
|
190
193
|
export { default as SideNavSwitcher } from './components/UIShell/SideNavSwitcher.js';
|
|
191
194
|
export { default as UnorderedList } from './components/UnorderedList/UnorderedList.js';
|
|
192
|
-
export { default as unstable__FluidComboBox } from './components/FluidComboBox/FluidComboBox.js';
|
|
193
|
-
export { default as unstable__FluidComboBoxSkeleton } from './components/FluidComboBox/FluidComboBox.Skeleton.js';
|
|
194
|
-
export { default as unstable__FluidDatePicker } from './components/FluidDatePicker/FluidDatePicker.js';
|
|
195
|
-
export { default as unstable__FluidDatePickerSkeleton } from './components/FluidDatePicker/FluidDatePicker.Skeleton.js';
|
|
196
|
-
export { default as unstable__FluidDatePickerInput } from './components/FluidDatePickerInput/FluidDatePickerInput.js';
|
|
197
|
-
export { default as unstable__FluidDropdown } from './components/FluidDropdown/FluidDropdown.js';
|
|
198
|
-
export { default as unstable__FluidDropdownSkeleton } from './components/FluidDropdown/FluidDropdown.Skeleton.js';
|
|
199
|
-
export { default as unstable__FluidMultiSelect } from './components/FluidMultiSelect/FluidMultiSelect.js';
|
|
200
|
-
export { default as unstable__FluidMultiSelectSkeleton } from './components/FluidMultiSelect/FluidMultiSelect.Skeleton.js';
|
|
201
|
-
export { default as unstable__FluidSelect } from './components/FluidSelect/FluidSelect.js';
|
|
202
|
-
export { default as unstable__FluidSelectSkeleton } from './components/FluidSelect/FluidSelect.Skeleton.js';
|
|
203
|
-
export { default as unstable__FluidSearch } from './components/FluidSearch/FluidSearch.js';
|
|
204
|
-
export { default as unstable__FluidSearchSkeleton } from './components/FluidSearch/FluidSearch.Skeleton.js';
|
|
205
|
-
export { default as unstable__FluidTextArea } from './components/FluidTextArea/FluidTextArea.js';
|
|
206
|
-
export { default as unstable__FluidTextAreaSkeleton } from './components/FluidTextArea/FluidTextArea.Skeleton.js';
|
|
207
|
-
export { default as unstable__FluidTextInput } from './components/FluidTextInput/FluidTextInput.js';
|
|
195
|
+
export { default as FluidComboBox, default as preview__FluidComboBox, default as unstable__FluidComboBox } from './components/FluidComboBox/FluidComboBox.js';
|
|
196
|
+
export { default as FluidComboBoxSkeleton, default as preview__FluidComboBoxSkeleton, default as unstable__FluidComboBoxSkeleton } from './components/FluidComboBox/FluidComboBox.Skeleton.js';
|
|
197
|
+
export { default as FluidDatePicker, default as preview__FluidDatePicker, default as unstable__FluidDatePicker } from './components/FluidDatePicker/FluidDatePicker.js';
|
|
198
|
+
export { default as FluidDatePickerSkeleton, default as preview__FluidDatePickerSkeleton, default as unstable__FluidDatePickerSkeleton } from './components/FluidDatePicker/FluidDatePicker.Skeleton.js';
|
|
199
|
+
export { default as FluidDatePickerInput, default as preview__FluidDatePickerInput, default as unstable__FluidDatePickerInput } from './components/FluidDatePickerInput/FluidDatePickerInput.js';
|
|
200
|
+
export { default as FluidDropdown, default as preview__FluidDropdown, default as unstable__FluidDropdown } from './components/FluidDropdown/FluidDropdown.js';
|
|
201
|
+
export { default as FluidDropdownSkeleton, default as preview__FluidDropdownSkeleton, default as unstable__FluidDropdownSkeleton } from './components/FluidDropdown/FluidDropdown.Skeleton.js';
|
|
202
|
+
export { default as FluidMultiSelect, default as preview__FluidMultiSelect, default as unstable__FluidMultiSelect } from './components/FluidMultiSelect/FluidMultiSelect.js';
|
|
203
|
+
export { default as FluidMultiSelectSkeleton, default as preview__FluidMultiSelectSkeleton, default as unstable__FluidMultiSelectSkeleton } from './components/FluidMultiSelect/FluidMultiSelect.Skeleton.js';
|
|
204
|
+
export { default as FluidSelect, default as preview__FluidSelect, default as unstable__FluidSelect } from './components/FluidSelect/FluidSelect.js';
|
|
205
|
+
export { default as FluidSelectSkeleton, default as preview__FluidSelectSkeleton, default as unstable__FluidSelectSkeleton } from './components/FluidSelect/FluidSelect.Skeleton.js';
|
|
206
|
+
export { default as FluidSearch, default as preview__FluidSearch, default as unstable__FluidSearch } from './components/FluidSearch/FluidSearch.js';
|
|
207
|
+
export { default as FluidSearchSkeleton, default as preview__FluidSearchSkeleton, default as unstable__FluidSearchSkeleton } from './components/FluidSearch/FluidSearch.Skeleton.js';
|
|
208
|
+
export { default as FluidTextArea, default as preview__FluidTextArea, default as unstable__FluidTextArea } from './components/FluidTextArea/FluidTextArea.js';
|
|
209
|
+
export { default as FluidTextAreaSkeleton, default as preview__FluidTextAreaSkeleton, default as unstable__FluidTextAreaSkeleton } from './components/FluidTextArea/FluidTextArea.Skeleton.js';
|
|
210
|
+
export { default as FluidTextInput, default as preview__FluidTextInput, default as unstable__FluidTextInput } from './components/FluidTextInput/FluidTextInput.js';
|
|
208
211
|
import './components/FluidTextInput/FluidPasswordInput.js';
|
|
209
|
-
export { default as unstable__FluidTextInputSkeleton } from './components/FluidTextInput/FluidTextInput.Skeleton.js';
|
|
210
|
-
export { default as unstable__FluidNumberInput } from './components/FluidNumberInput/FluidNumberInput.js';
|
|
211
|
-
export { default as unstable__FluidNumberInputSkeleton } from './components/FluidNumberInput/FluidNumberInput.Skeleton.js';
|
|
212
|
-
export { default as unstable__FluidTimePicker } from './components/FluidTimePicker/FluidTimePicker.js';
|
|
213
|
-
export { default as unstable__FluidTimePickerSkeleton } from './components/FluidTimePicker/FluidTimePicker.Skeleton.js';
|
|
214
|
-
export { default as unstable__FluidTimePickerSelect } from './components/FluidTimePickerSelect/FluidTimePickerSelect.js';
|
|
212
|
+
export { default as FluidTextInputSkeleton, default as preview__FluidTextInputSkeleton, default as unstable__FluidTextInputSkeleton } from './components/FluidTextInput/FluidTextInput.Skeleton.js';
|
|
213
|
+
export { default as FluidNumberInput, default as preview__FluidNumberInput, default as unstable__FluidNumberInput } from './components/FluidNumberInput/FluidNumberInput.js';
|
|
214
|
+
export { default as FluidNumberInputSkeleton, default as preview__FluidNumberInputSkeleton, default as unstable__FluidNumberInputSkeleton } from './components/FluidNumberInput/FluidNumberInput.Skeleton.js';
|
|
215
|
+
export { default as FluidTimePicker, default as preview__FluidTimePicker, default as unstable__FluidTimePicker } from './components/FluidTimePicker/FluidTimePicker.js';
|
|
216
|
+
export { default as FluidTimePickerSkeleton, default as preview__FluidTimePickerSkeleton, default as unstable__FluidTimePickerSkeleton } from './components/FluidTimePicker/FluidTimePicker.Skeleton.js';
|
|
217
|
+
export { default as FluidTimePickerSelect, default as preview__FluidTimePickerSelect, default as unstable__FluidTimePickerSelect } from './components/FluidTimePickerSelect/FluidTimePickerSelect.js';
|
|
215
218
|
export { Heading, Section } from './components/Heading/index.js';
|
|
216
219
|
export { IconButton, IconButtonKinds } from './components/IconButton/index.js';
|
|
217
220
|
export { Layer, useLayer } from './components/Layer/index.js';
|
|
218
|
-
export { Layout as unstable_Layout } from './components/Layout/index.js';
|
|
219
|
-
export { LayoutDirection as unstable_LayoutDirection } from './components/LayoutDirection/LayoutDirection.js';
|
|
220
|
-
export { useLayoutDirection as unstable_useLayoutDirection } from './components/LayoutDirection/useLayoutDirection.js';
|
|
221
|
-
export { OverflowMenuV2 as unstable_OverflowMenuV2 } from './components/OverflowMenuV2/index.js';
|
|
221
|
+
export { Layout as preview_Layout, Layout as unstable_Layout } from './components/Layout/index.js';
|
|
222
|
+
export { LayoutDirection as preview_LayoutDirection, LayoutDirection as unstable_LayoutDirection } from './components/LayoutDirection/LayoutDirection.js';
|
|
223
|
+
export { useLayoutDirection as preview_useLayoutDirection, useLayoutDirection as unstable_useLayoutDirection } from './components/LayoutDirection/useLayoutDirection.js';
|
|
224
|
+
export { OverflowMenuV2 as preview_OverflowMenuV2, OverflowMenuV2 as unstable_OverflowMenuV2 } from './components/OverflowMenuV2/index.js';
|
|
222
225
|
export { Popover, PopoverContent } from './components/Popover/index.js';
|
|
223
226
|
export { default as ProgressBar } from './components/ProgressBar/ProgressBar.js';
|
|
224
|
-
export { AILabel, AILabelActions, AILabelContent, AILabel as unstable__Slug, AILabelActions as unstable__SlugActions, AILabelContent as unstable__SlugContent } from './components/AILabel/index.js';
|
|
225
|
-
export { IconIndicator as unstable__IconIndicator } from './components/IconIndicator/index.js';
|
|
226
|
-
export { ShapeIndicator as unstable__ShapeIndicator } from './components/ShapeIndicator/index.js';
|
|
227
|
-
export { default as unstable__ChatButton } from './components/ChatButton/ChatButton.js';
|
|
228
|
-
export { default as unstable__ChatButtonSkeleton } from './components/ChatButton/ChatButton.Skeleton.js';
|
|
229
|
-
export { default as AISkeletonPlaceholder, default as unstable__AiSkeletonPlaceholder } from './components/AISkeleton/AISkeletonPlaceholder.js';
|
|
230
|
-
export { default as AISkeletonIcon, default as unstable__AiSkeletonIcon } from './components/AISkeleton/AISkeletonIcon.js';
|
|
231
|
-
export { default as AISkeletonText, default as unstable__AiSkeletonText } from './components/AISkeleton/AISkeletonText.js';
|
|
227
|
+
export { AILabel, AILabelActions, AILabelContent, AILabel as preview__Slug, AILabelActions as preview__SlugActions, AILabelContent as preview__SlugContent, AILabel as unstable__Slug, AILabelActions as unstable__SlugActions, AILabelContent as unstable__SlugContent } from './components/AILabel/index.js';
|
|
228
|
+
export { IconIndicator as preview__IconIndicator, IconIndicator as unstable__IconIndicator } from './components/IconIndicator/index.js';
|
|
229
|
+
export { ShapeIndicator as preview__ShapeIndicator, ShapeIndicator as unstable__ShapeIndicator } from './components/ShapeIndicator/index.js';
|
|
230
|
+
export { default as preview__ChatButton, default as unstable__ChatButton } from './components/ChatButton/ChatButton.js';
|
|
231
|
+
export { default as preview__ChatButtonSkeleton, default as unstable__ChatButtonSkeleton } from './components/ChatButton/ChatButton.Skeleton.js';
|
|
232
|
+
export { default as AISkeletonPlaceholder, default as preview__AiSkeletonPlaceholder, default as unstable__AiSkeletonPlaceholder } from './components/AISkeleton/AISkeletonPlaceholder.js';
|
|
233
|
+
export { default as AISkeletonIcon, default as preview__AiSkeletonIcon, default as unstable__AiSkeletonIcon } from './components/AISkeleton/AISkeletonIcon.js';
|
|
234
|
+
export { default as AISkeletonText, default as preview__AiSkeletonText, default as unstable__AiSkeletonText } from './components/AISkeleton/AISkeletonText.js';
|
|
232
235
|
export { DefinitionTooltip } from './components/Tooltip/DefinitionTooltip.js';
|
|
233
236
|
export { Tooltip } from './components/Tooltip/Tooltip.js';
|
|
234
237
|
import './components/Text/index.js';
|
|
235
238
|
export { GlobalTheme, Theme, ThemeContext, usePrefersDarkScheme, useTheme } from './components/Theme/index.js';
|
|
236
239
|
export { PrefixContext, usePrefix } from './internal/usePrefix.js';
|
|
237
240
|
export { useIdPrefix } from './internal/useIdPrefix.js';
|
|
238
|
-
export { default as unstable_PageSelector } from './components/Pagination/experimental/PageSelector.js';
|
|
239
|
-
export { default as unstable_Pagination } from './components/Pagination/experimental/Pagination.js';
|
|
241
|
+
export { default as preview_PageSelector, default as unstable_PageSelector } from './components/Pagination/experimental/PageSelector.js';
|
|
242
|
+
export { default as preview_Pagination, default as unstable_Pagination } from './components/Pagination/experimental/Pagination.js';
|
|
240
243
|
export { default as ContainedListItem } from './components/ContainedList/ContainedListItem/ContainedListItem.js';
|
|
241
244
|
export { default as ContainedList } from './components/ContainedList/ContainedList.js';
|
|
242
|
-
export {
|
|
243
|
-
export {
|
|
244
|
-
export { TextDirection as unstable_TextDirection } from './components/Text/TextDirection.js';
|
|
245
|
+
export { Text as preview_Text, Text as unstable_Text } from './components/Text/Text.js';
|
|
246
|
+
export { TextDirection as preview_TextDirection, TextDirection as unstable_TextDirection } from './components/Text/TextDirection.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
*/
|
|
7
|
+
export declare const defaultItemToString: <ItemType>(item: ItemType | null) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
const defaultItemToString = item => {
|
|
9
|
+
if (typeof item === 'string') return item;
|
|
10
|
+
if (typeof item === 'number') return `${item}`;
|
|
11
|
+
if (item && typeof item === 'object' && 'label' in item && typeof item.label === 'string') {
|
|
12
|
+
return item.label;
|
|
13
|
+
}
|
|
14
|
+
return '';
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export { defaultItemToString };
|
package/es/internal/index.d.ts
CHANGED
|
@@ -1 +1,8 @@
|
|
|
1
|
-
|
|
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
|
+
*/
|
|
7
|
+
import type { Requireable, Validator } from 'prop-types';
|
|
8
|
+
export declare const deprecateValuesWithin: <T>(propType: Requireable<T>, allowedValues?: readonly unknown[], propMappingFunction?: (deprecatedValue: T) => T) => Validator<T> | Requireable<T>;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
import { warning } from '../internal/warning.js';
|
|
9
9
|
|
|
10
10
|
const didWarnAboutDeprecation = {};
|
|
11
|
-
|
|
12
|
-
return
|
|
13
|
-
if (props[propName] === undefined) {
|
|
14
|
-
return;
|
|
11
|
+
const deprecateValuesWithin = (propType, allowedValues, propMappingFunction) => {
|
|
12
|
+
return (props, propName, componentName, ...rest) => {
|
|
13
|
+
if (typeof props[propName] === 'undefined') {
|
|
14
|
+
return null;
|
|
15
15
|
}
|
|
16
16
|
if (!didWarnAboutDeprecation[componentName] || !didWarnAboutDeprecation[componentName][propName]) {
|
|
17
17
|
didWarnAboutDeprecation[componentName] = {
|
|
@@ -27,6 +27,6 @@ function deprecateValuesWithin(propType, allowedValues, propMappingFunction) {
|
|
|
27
27
|
}
|
|
28
28
|
return propType(props, propName, componentName, ...rest);
|
|
29
29
|
};
|
|
30
|
-
}
|
|
30
|
+
};
|
|
31
31
|
|
|
32
|
-
export { deprecateValuesWithin
|
|
32
|
+
export { deprecateValuesWithin };
|
|
@@ -1,14 +1,15 @@
|
|
|
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
|
+
import type { Validator } from 'prop-types';
|
|
7
8
|
/**
|
|
8
|
-
* @param
|
|
9
|
-
*
|
|
10
|
-
* @param
|
|
11
|
-
* @returns
|
|
12
|
-
*
|
|
9
|
+
* @param name The name of the prop that must exist to validate the current
|
|
10
|
+
* prop.
|
|
11
|
+
* @param propType The original prop type checker.
|
|
12
|
+
* @returns The new prop type checker for the current prop that becomes required
|
|
13
|
+
* if the prop corresponding to the provided prop name exists.
|
|
13
14
|
*/
|
|
14
|
-
export
|
|
15
|
+
export declare const requiredIfGivenPropIsTruthy: <T>(name: string, propType: Validator<T>) => Validator<T>;
|
|
@@ -6,19 +6,19 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @param
|
|
10
|
-
*
|
|
11
|
-
* @param
|
|
12
|
-
* @returns
|
|
13
|
-
*
|
|
9
|
+
* @param name The name of the prop that must exist to validate the current
|
|
10
|
+
* prop.
|
|
11
|
+
* @param propType The original prop type checker.
|
|
12
|
+
* @returns The new prop type checker for the current prop that becomes required
|
|
13
|
+
* if the prop corresponding to the provided prop name exists.
|
|
14
14
|
*/
|
|
15
|
-
|
|
16
|
-
return
|
|
17
|
-
if (process.env.NODE_ENV !== 'production' && props[name]
|
|
15
|
+
const requiredIfGivenPropIsTruthy = (name, propType) => {
|
|
16
|
+
return (props, propName, componentName, ...rest) => {
|
|
17
|
+
if (process.env.NODE_ENV !== 'production' && props[name] === true && props[propName] === null) {
|
|
18
18
|
return new Error(`You must provide a value for \`${propName}\` in \`${componentName}\` if \`${name}\` exists.`);
|
|
19
19
|
}
|
|
20
20
|
return propType(props, propName, componentName, ...rest);
|
|
21
21
|
};
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
23
|
|
|
24
|
-
export { requiredIfGivenPropIsTruthy
|
|
24
|
+
export { requiredIfGivenPropIsTruthy };
|
|
@@ -1,5 +1,5 @@
|
|
|
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.
|
|
@@ -11,14 +11,39 @@ export interface BreadcrumbSkeletonProps extends React.HTMLAttributes<HTMLDivEle
|
|
|
11
11
|
* Specify an optional className to add.
|
|
12
12
|
*/
|
|
13
13
|
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the number of items
|
|
16
|
+
*/
|
|
17
|
+
items?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Optional prop to omit the trailing slash for the breadcrumbs
|
|
20
|
+
*/
|
|
21
|
+
noTrailingSlash?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Specify the size of the Breadcrumb. Currently
|
|
24
|
+
* supports the following: `sm` & `md` (default: 'md')
|
|
25
|
+
*/
|
|
26
|
+
size?: 'sm' | 'md';
|
|
14
27
|
}
|
|
15
|
-
declare function BreadcrumbSkeleton({ className, ...rest }: BreadcrumbSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
declare function BreadcrumbSkeleton({ className, items, noTrailingSlash, size, ...rest }: BreadcrumbSkeletonProps): import("react/jsx-runtime").JSX.Element;
|
|
16
29
|
declare namespace BreadcrumbSkeleton {
|
|
17
30
|
var propTypes: {
|
|
18
31
|
/**
|
|
19
32
|
* Specify an optional className to add.
|
|
20
33
|
*/
|
|
21
34
|
className: PropTypes.Requireable<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Specify the number of items
|
|
37
|
+
*/
|
|
38
|
+
items: PropTypes.Requireable<number>;
|
|
39
|
+
/**
|
|
40
|
+
* Optional prop to omit the trailing slash for the breadcrumbs
|
|
41
|
+
*/
|
|
42
|
+
noTrailingSlash: PropTypes.Requireable<boolean>;
|
|
43
|
+
/**
|
|
44
|
+
* Specify the size of the Breadcrumb. Currently supports the following: `sm` & `md` (default: 'md')
|
|
45
|
+
*/
|
|
46
|
+
size: PropTypes.Requireable<string>;
|
|
22
47
|
};
|
|
23
48
|
}
|
|
24
49
|
export default BreadcrumbSkeleton;
|