@carbon/react 1.66.0-rc.0 → 1.67.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 +1031 -1047
- 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 +37 -14
- package/es/components/ComboButton/index.js +1 -1
- 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/DataTable/TableExpandHeader.d.ts +2 -2
- package/es/components/DataTable/TableExpandHeader.js +1 -1
- package/es/components/DatePicker/DatePicker.js +1 -0
- package/es/components/Dropdown/Dropdown.js +2 -2
- package/es/components/FeatureFlags/index.js +27 -7
- package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +15 -0
- package/es/components/FluidNumberInput/FluidNumberInput.d.ts +95 -0
- package/es/components/FluidNumberInput/index.d.ts +11 -0
- package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +15 -0
- package/es/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
- package/es/components/FluidSearch/FluidSearch.d.ts +73 -0
- package/es/components/FluidSearch/FluidSearch.js +1 -2
- package/es/components/FluidSearch/index.d.ts +11 -0
- package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +15 -0
- package/es/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
- package/es/components/FluidSelect/FluidSelect.d.ts +57 -0
- package/es/components/FluidSelect/FluidSelect.js +1 -2
- package/es/components/FluidSelect/index.d.ts +13 -0
- package/es/components/FluidSelect/index.js +1 -0
- 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/FluidTextInput/FluidPasswordInput.d.ts +83 -0
- package/es/components/FluidTextInput/FluidPasswordInput.js +87 -0
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +15 -0
- package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
- package/es/components/FluidTextInput/FluidTextInput.d.ts +70 -0
- package/es/components/FluidTextInput/FluidTextInput.js +6 -4
- package/es/components/FluidTextInput/index.d.ts +15 -0
- package/es/components/FluidTextInput/index.js +2 -0
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.d.ts +35 -0
- package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +4 -2
- package/es/components/FluidTimePicker/FluidTimePicker.d.ts +45 -0
- package/es/components/FluidTimePicker/FluidTimePicker.js +5 -5
- package/es/components/FluidTimePicker/index.d.ts +13 -0
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +41 -0
- package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
- package/es/components/FluidTimePickerSelect/index.d.ts +11 -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 +6 -5
- package/es/components/MultiSelect/MultiSelect.js +2 -1
- package/es/components/Notification/Notification.js +4 -2
- package/es/components/OverflowMenu/next/index.js +3 -1
- package/es/components/OverflowMenuV2/index.js +1 -3
- package/es/components/Pagination/Pagination.js +1 -1
- package/es/components/Popover/index.js +2 -2
- package/es/components/Tabs/Tabs.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/components/UIShell/HeaderPanel.js +1 -1
- package/es/index.js +12 -11
- package/es/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +757 -4
- package/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +76 -0
- package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +106 -6
- 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 +38 -15
- package/lib/components/ComboButton/index.js +2 -2
- 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/DataTable/TableExpandHeader.d.ts +2 -2
- package/lib/components/DataTable/TableExpandHeader.js +1 -1
- package/lib/components/DatePicker/DatePicker.js +1 -0
- package/lib/components/Dropdown/Dropdown.js +3 -3
- package/lib/components/FeatureFlags/index.js +27 -7
- package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +15 -0
- package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +95 -0
- package/lib/components/FluidNumberInput/index.d.ts +11 -0
- package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +15 -0
- package/lib/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
- package/lib/components/FluidSearch/FluidSearch.d.ts +73 -0
- package/lib/components/FluidSearch/FluidSearch.js +1 -2
- package/lib/components/FluidSearch/index.d.ts +11 -0
- package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +15 -0
- package/lib/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
- package/lib/components/FluidSelect/FluidSelect.d.ts +57 -0
- package/lib/components/FluidSelect/FluidSelect.js +1 -2
- package/lib/components/FluidSelect/index.d.ts +13 -0
- package/lib/components/FluidSelect/index.js +2 -0
- 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/FluidTextInput/FluidPasswordInput.d.ts +83 -0
- package/lib/components/FluidTextInput/FluidPasswordInput.js +93 -0
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +15 -0
- package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
- package/lib/components/FluidTextInput/FluidTextInput.d.ts +70 -0
- package/lib/components/FluidTextInput/FluidTextInput.js +6 -4
- package/lib/components/FluidTextInput/index.d.ts +15 -0
- package/lib/components/FluidTextInput/index.js +3 -0
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.d.ts +35 -0
- package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +4 -2
- package/lib/components/FluidTimePicker/FluidTimePicker.d.ts +45 -0
- package/lib/components/FluidTimePicker/FluidTimePicker.js +6 -6
- package/lib/components/FluidTimePicker/index.d.ts +13 -0
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +41 -0
- package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
- package/lib/components/FluidTimePickerSelect/index.d.ts +11 -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 +7 -6
- package/lib/components/MultiSelect/MultiSelect.js +3 -2
- package/lib/components/Notification/Notification.js +4 -2
- package/lib/components/OverflowMenu/next/index.js +3 -1
- package/lib/components/OverflowMenuV2/index.js +1 -3
- package/lib/components/Pagination/Pagination.js +1 -1
- package/lib/components/Popover/index.js +3 -3
- package/lib/components/Tabs/Tabs.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/components/UIShell/HeaderPanel.js +1 -1
- package/lib/index.js +23 -22
- package/lib/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +763 -2
- package/lib/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +80 -0
- package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +121 -5
- package/package.json +10 -10
|
@@ -12,6 +12,10 @@ export interface CopyButtonProps extends ButtonProps<'button'> {
|
|
|
12
12
|
* Specify how the trigger should align with the tooltip
|
|
13
13
|
*/
|
|
14
14
|
align?: 'top' | 'top-left' | 'top-right' | 'bottom' | 'bottom-left' | 'bottom-right' | 'left' | 'right';
|
|
15
|
+
/**
|
|
16
|
+
* **Experimental**: Will attempt to automatically align the tooltip
|
|
17
|
+
*/
|
|
18
|
+
autoAlign?: boolean;
|
|
15
19
|
/**
|
|
16
20
|
* Specify an optional className to be applied to the underlying `<button>`
|
|
17
21
|
*/
|
|
@@ -36,13 +40,17 @@ export interface CopyButtonProps extends ButtonProps<'button'> {
|
|
|
36
40
|
*/
|
|
37
41
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
38
42
|
}
|
|
39
|
-
declare function CopyButton({ align, feedback, feedbackTimeout, iconDescription, className, onClick, ...other }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
declare function CopyButton({ align, autoAlign, feedback, feedbackTimeout, iconDescription, className, onClick, ...other }: CopyButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
40
44
|
declare namespace CopyButton {
|
|
41
45
|
var propTypes: {
|
|
42
46
|
/**
|
|
43
47
|
* Specify how the trigger should align with the tooltip
|
|
44
48
|
*/
|
|
45
49
|
align: PropTypes.Requireable<string>;
|
|
50
|
+
/**
|
|
51
|
+
* **Experimental**: Will attempt to automatically align the tooltip
|
|
52
|
+
*/
|
|
53
|
+
autoAlign: PropTypes.Requireable<boolean>;
|
|
46
54
|
/**
|
|
47
55
|
* Specify an optional className to be applied to the underlying `<button>`
|
|
48
56
|
*/
|
|
@@ -28,6 +28,7 @@ var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
|
28
28
|
function CopyButton(_ref) {
|
|
29
29
|
let {
|
|
30
30
|
align = 'bottom',
|
|
31
|
+
autoAlign = false,
|
|
31
32
|
feedback = 'Copied!',
|
|
32
33
|
feedbackTimeout = 2000,
|
|
33
34
|
iconDescription = 'Copy to clipboard',
|
|
@@ -46,6 +47,7 @@ function CopyButton(_ref) {
|
|
|
46
47
|
feedbackTimeout: feedbackTimeout,
|
|
47
48
|
onClick: onClick,
|
|
48
49
|
align: align,
|
|
50
|
+
autoAlign: autoAlign,
|
|
49
51
|
className: cx__default["default"](className, `${prefix}--copy-btn`),
|
|
50
52
|
"aria-label": iconDescription
|
|
51
53
|
}, other), /*#__PURE__*/React__default["default"].createElement(iconsReact.Copy, {
|
|
@@ -57,6 +59,10 @@ CopyButton.propTypes = {
|
|
|
57
59
|
* Specify how the trigger should align with the tooltip
|
|
58
60
|
*/
|
|
59
61
|
align: PropTypes__default["default"].oneOf(['top', 'top-left', 'top-right', 'bottom', 'bottom-left', 'bottom-right', 'left', 'right']),
|
|
62
|
+
/**
|
|
63
|
+
* **Experimental**: Will attempt to automatically align the tooltip
|
|
64
|
+
*/
|
|
65
|
+
autoAlign: PropTypes__default["default"].bool,
|
|
60
66
|
/**
|
|
61
67
|
* Specify an optional className to be applied to the underlying `<button>`
|
|
62
68
|
*/
|
|
@@ -22,7 +22,7 @@ type TableExpandHeaderPropsBase = {
|
|
|
22
22
|
* Specify the string read by a voice reader when the expand trigger is
|
|
23
23
|
* focused
|
|
24
24
|
*/
|
|
25
|
-
['aria-label']
|
|
25
|
+
['aria-label']?: string;
|
|
26
26
|
/**
|
|
27
27
|
* @deprecated The enableExpando prop is being replaced by `enableToggle`
|
|
28
28
|
*/
|
|
@@ -79,7 +79,7 @@ declare const TableExpandHeader: {
|
|
|
79
79
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
80
80
|
className: PropTypes.Requireable<string>;
|
|
81
81
|
/**
|
|
82
|
-
* The enableExpando prop is being replaced by
|
|
82
|
+
* The enableExpando prop is being replaced by TableExpandHeader
|
|
83
83
|
*/
|
|
84
84
|
enableExpando: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
|
|
85
85
|
/**
|
|
@@ -79,7 +79,7 @@ TableExpandHeader.propTypes = {
|
|
|
79
79
|
children: PropTypes__default["default"].node,
|
|
80
80
|
className: PropTypes__default["default"].string,
|
|
81
81
|
/**
|
|
82
|
-
* The enableExpando prop is being replaced by
|
|
82
|
+
* The enableExpando prop is being replaced by TableExpandHeader
|
|
83
83
|
*/
|
|
84
84
|
enableExpando: deprecate["default"](PropTypes__default["default"].bool, 'The `enableExpando` prop has been deprecated in favor of `enableToggle`. This prop will be removed in the next major release.'),
|
|
85
85
|
/**
|
|
@@ -566,6 +566,7 @@ const DatePicker = /*#__PURE__*/React__default["default"].forwardRef(function Da
|
|
|
566
566
|
if (!calendarRef.current || !startInputField.current) return;
|
|
567
567
|
const handleKeyDown = event => {
|
|
568
568
|
if (match.match(event, keys.Tab) && !event.shiftKey && document.activeElement === endInputField.current && calendarRef.current.isOpen) {
|
|
569
|
+
event.preventDefault();
|
|
569
570
|
calendarRef.current.close();
|
|
570
571
|
// Remove focus from endDate calendar input
|
|
571
572
|
document.activeElement instanceof HTMLElement &&
|
|
@@ -23,7 +23,7 @@ require('../FluidForm/FluidForm.js');
|
|
|
23
23
|
var FormContext = require('../FluidForm/FormContext.js');
|
|
24
24
|
var useId = require('../../internal/useId.js');
|
|
25
25
|
var react = require('@floating-ui/react');
|
|
26
|
-
var
|
|
26
|
+
var floatingUi_dom = require('../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js');
|
|
27
27
|
var ListBoxPropTypes = require('../ListBox/ListBoxPropTypes.js');
|
|
28
28
|
|
|
29
29
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
@@ -103,7 +103,7 @@ const Dropdown = /*#__PURE__*/React__default["default"].forwardRef((_ref, ref) =
|
|
|
103
103
|
width: `${rects.reference.width}px`
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
|
-
}), react.flip(),
|
|
106
|
+
}), react.flip(), floatingUi_dom.hide()],
|
|
107
107
|
whileElementsMounted: react.autoUpdate
|
|
108
108
|
} : {} // When autoAlign is turned off, floating-ui will not be used
|
|
109
109
|
);
|
|
@@ -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,
|
|
@@ -12,6 +12,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
12
12
|
var FeatureFlags$1 = require('@carbon/feature-flags');
|
|
13
13
|
var PropTypes = require('prop-types');
|
|
14
14
|
var React = require('react');
|
|
15
|
+
var deprecate = require('../../prop-types/deprecate.js');
|
|
15
16
|
|
|
16
17
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
17
18
|
|
|
@@ -32,17 +33,30 @@ const FeatureFlagContext = /*#__PURE__*/React.createContext(FeatureFlags$1.Featu
|
|
|
32
33
|
function FeatureFlags(_ref) {
|
|
33
34
|
let {
|
|
34
35
|
children,
|
|
35
|
-
flags = {}
|
|
36
|
+
flags = {},
|
|
37
|
+
enableV12TileDefaultIcons = false,
|
|
38
|
+
enableV12TileRadioIcons = false,
|
|
39
|
+
enableV12Overflowmenu = false,
|
|
40
|
+
enableTreeviewControllable = false,
|
|
41
|
+
enableExperimentalFocusWrapWithoutSentinels = false
|
|
36
42
|
} = _ref;
|
|
37
43
|
const parentScope = React.useContext(FeatureFlagContext);
|
|
38
44
|
const [prevParentScope, setPrevParentScope] = React.useState(parentScope);
|
|
45
|
+
const combinedFlags = {
|
|
46
|
+
'enable-v12-tile-default-icons': enableV12TileDefaultIcons,
|
|
47
|
+
'enable-v12-tile-radio-icons': enableV12TileRadioIcons,
|
|
48
|
+
'enable-v12-overflowmenu': enableV12Overflowmenu,
|
|
49
|
+
'enable-treeview-controllable': enableTreeviewControllable,
|
|
50
|
+
'enable-experimental-focus-wrap-without-sentinels': enableExperimentalFocusWrapWithoutSentinels,
|
|
51
|
+
...flags
|
|
52
|
+
};
|
|
39
53
|
const [scope, updateScope] = React.useState(() => {
|
|
40
|
-
const scope = FeatureFlags$1.createScope(
|
|
54
|
+
const scope = FeatureFlags$1.createScope(combinedFlags);
|
|
41
55
|
scope.mergeWithScope(parentScope);
|
|
42
56
|
return scope;
|
|
43
57
|
});
|
|
44
58
|
if (parentScope !== prevParentScope) {
|
|
45
|
-
const scope = FeatureFlags$1.createScope(
|
|
59
|
+
const scope = FeatureFlags$1.createScope(combinedFlags);
|
|
46
60
|
scope.mergeWithScope(parentScope);
|
|
47
61
|
updateScope(scope);
|
|
48
62
|
setPrevParentScope(parentScope);
|
|
@@ -51,7 +65,7 @@ function FeatureFlags(_ref) {
|
|
|
51
65
|
// We use a custom hook to detect if any of the keys or their values change
|
|
52
66
|
// for flags that are passed in. If they have changed, then we re-create the
|
|
53
67
|
// FeatureFlagScope using the new flags
|
|
54
|
-
useChangedValue(
|
|
68
|
+
useChangedValue(combinedFlags, isEqual, changedFlags => {
|
|
55
69
|
const scope = FeatureFlags$1.createScope(changedFlags);
|
|
56
70
|
scope.mergeWithScope(parentScope);
|
|
57
71
|
updateScope(scope);
|
|
@@ -63,9 +77,14 @@ function FeatureFlags(_ref) {
|
|
|
63
77
|
FeatureFlags.propTypes = {
|
|
64
78
|
children: PropTypes__default["default"].node,
|
|
65
79
|
/**
|
|
66
|
-
* Provide the feature flags to enabled or disabled in the current
|
|
80
|
+
* Provide the feature flags to enabled or disabled in the current Rea,ct tree
|
|
67
81
|
*/
|
|
68
|
-
flags: PropTypes__default["default"].objectOf(PropTypes__default["default"].bool)
|
|
82
|
+
flags: deprecate["default"](PropTypes__default["default"].objectOf(PropTypes__default["default"].bool), 'The `flags` prop for `FeatureFlag` has ' + 'been deprecated. Please run the `featureflag-deprecate-flags-prop` codemod to migrate to individual boolean props.' + `npx @carbon/upgrade migrate featureflag-deprecate-flags-prop --write`),
|
|
83
|
+
enableV12TileDefaultIcons: PropTypes__default["default"].bool,
|
|
84
|
+
enableV12TileRadioIcons: PropTypes__default["default"].bool,
|
|
85
|
+
enableV12Overflowmenu: PropTypes__default["default"].bool,
|
|
86
|
+
enableTreeviewControllable: PropTypes__default["default"].bool,
|
|
87
|
+
enableExperimentalFocusWrapWithoutSentinels: PropTypes__default["default"].bool
|
|
69
88
|
};
|
|
70
89
|
|
|
71
90
|
/**
|
|
@@ -107,7 +126,8 @@ function useChangedValue(value, compare, callback) {
|
|
|
107
126
|
*/
|
|
108
127
|
function useFeatureFlag(flag) {
|
|
109
128
|
const scope = React.useContext(FeatureFlagContext);
|
|
110
|
-
return
|
|
129
|
+
//updated to return false for undefined flags
|
|
130
|
+
return scope.enabled(flag) ?? false;
|
|
111
131
|
}
|
|
112
132
|
|
|
113
133
|
/**
|
|
@@ -0,0 +1,15 @@
|
|
|
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 FluidNumberInputSkeletonProps {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const FluidNumberInputSkeleton: React.FC<FluidNumberInputSkeletonProps>;
|
|
15
|
+
export default FluidNumberInputSkeleton;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2022
|
|
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 FluidNumberInputProps {
|
|
9
|
+
/**
|
|
10
|
+
* `true` to allow empty string.
|
|
11
|
+
*/
|
|
12
|
+
allowEmpty?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Specify an optional className to be applied to the wrapper node
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optional starting value for uncontrolled state
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: number | string;
|
|
21
|
+
/**
|
|
22
|
+
* Specify if the wheel functionality for the input should be disabled, or not
|
|
23
|
+
*/
|
|
24
|
+
disableWheel?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Specify if the control should be disabled, or not
|
|
27
|
+
*/
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Provide a description for up/down icons that can be read by screen readers
|
|
31
|
+
*/
|
|
32
|
+
iconDescription?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Specify a custom `id` for the input
|
|
35
|
+
*/
|
|
36
|
+
id: string;
|
|
37
|
+
/**
|
|
38
|
+
* Specify if the currently value is invalid.
|
|
39
|
+
*/
|
|
40
|
+
invalid?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Message which is displayed if the value is invalid.
|
|
43
|
+
*/
|
|
44
|
+
invalidText?: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Generic `label` that will be used as the textual representation of what
|
|
47
|
+
* this field is for
|
|
48
|
+
*/
|
|
49
|
+
label?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* The maximum value.
|
|
52
|
+
*/
|
|
53
|
+
max?: number;
|
|
54
|
+
/**
|
|
55
|
+
* The minimum value.
|
|
56
|
+
*/
|
|
57
|
+
min?: number;
|
|
58
|
+
onChange?: (event: React.MouseEvent<HTMLButtonElement>, state: {
|
|
59
|
+
value: number | string;
|
|
60
|
+
direction: string;
|
|
61
|
+
}) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Provide an optional function to be called when the up/down button is clicked
|
|
64
|
+
*/
|
|
65
|
+
onClick?: (event: React.MouseEvent<HTMLElement>, state?: {
|
|
66
|
+
value: number | string;
|
|
67
|
+
direction: string;
|
|
68
|
+
}) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Provide an optional function to be called when a key is pressed in the number input
|
|
71
|
+
*/
|
|
72
|
+
onKeyUp?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
73
|
+
/**
|
|
74
|
+
* Specify how much the values should increase/decrease upon clicking on up/down button
|
|
75
|
+
*/
|
|
76
|
+
step?: number;
|
|
77
|
+
/**
|
|
78
|
+
* Provide custom text for the component for each translation id
|
|
79
|
+
*/
|
|
80
|
+
translateWithId?: (id: string) => string;
|
|
81
|
+
/**
|
|
82
|
+
* Specify the value of the input
|
|
83
|
+
*/
|
|
84
|
+
value?: number | string;
|
|
85
|
+
/**
|
|
86
|
+
* Specify whether the control is currently in warning state
|
|
87
|
+
*/
|
|
88
|
+
warn?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* Provide the text that is displayed when the control is in warning state
|
|
91
|
+
*/
|
|
92
|
+
warnText?: React.ReactNode;
|
|
93
|
+
}
|
|
94
|
+
declare const FluidNumberInput: React.FC<FluidNumberInputProps>;
|
|
95
|
+
export default FluidNumberInput;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { FluidNumberInputProps } from './FluidNumberInput';
|
|
8
|
+
import { FluidNumberInputSkeletonProps } from './FluidNumberInput.Skeleton';
|
|
9
|
+
export { type FluidNumberInputProps, type FluidNumberInputSkeletonProps };
|
|
10
|
+
export { default, default as FluidNumberInput } from './FluidNumberInput';
|
|
11
|
+
export { default as FluidNumberInputSkeleton } from './FluidNumberInput.Skeleton';
|
|
@@ -0,0 +1,15 @@
|
|
|
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 FluidSearchSkeletonProps {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const FluidSearchSkeleton: React.FC<FluidSearchSkeletonProps>;
|
|
15
|
+
export default FluidSearchSkeleton;
|
|
@@ -22,7 +22,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
23
23
|
var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
const FluidSearchSkeleton = _ref => {
|
|
26
26
|
let {
|
|
27
27
|
className,
|
|
28
28
|
...other
|
|
@@ -39,7 +39,7 @@ function FluidSearchSkeleton(_ref) {
|
|
|
39
39
|
}), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
40
40
|
className: `${prefix}--skeleton ${prefix}--text-input`
|
|
41
41
|
})));
|
|
42
|
-
}
|
|
42
|
+
};
|
|
43
43
|
FluidSearchSkeleton.propTypes = {
|
|
44
44
|
/**
|
|
45
45
|
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2022
|
|
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 FluidSearchProps {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional value for the `autocomplete` property on the underlying
|
|
11
|
+
* `<input>`, defaults to "off"
|
|
12
|
+
*/
|
|
13
|
+
autoComplete?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify an optional className to be applied to the container node
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Specify a label to be read by screen readers on the "close" button
|
|
20
|
+
*/
|
|
21
|
+
closeButtonLabelText?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Optionally provide the default value of the `<input>`
|
|
24
|
+
*/
|
|
25
|
+
defaultValue?: string | number;
|
|
26
|
+
/**
|
|
27
|
+
* Specify whether the `<input>` should be disabled
|
|
28
|
+
*/
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Specify a custom `id` for the input
|
|
32
|
+
*/
|
|
33
|
+
id?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Provide the label text for the Search icon
|
|
36
|
+
*/
|
|
37
|
+
labelText: React.ReactNode;
|
|
38
|
+
/**
|
|
39
|
+
* Optional callback called when the search value changes.
|
|
40
|
+
*/
|
|
41
|
+
onChange?(e: {
|
|
42
|
+
target: HTMLInputElement;
|
|
43
|
+
type: 'change';
|
|
44
|
+
}): void;
|
|
45
|
+
/**
|
|
46
|
+
* Optional callback called when the search value is cleared.
|
|
47
|
+
*/
|
|
48
|
+
onClear?: () => void;
|
|
49
|
+
/**
|
|
50
|
+
* Provide a handler that is invoked on the key down event for the input
|
|
51
|
+
*/
|
|
52
|
+
onKeyDown?: React.KeyboardEventHandler<HTMLInputElement>;
|
|
53
|
+
/**
|
|
54
|
+
* Provide an optional placeholder text for the Search.
|
|
55
|
+
* Note: if the label and placeholder differ,
|
|
56
|
+
* VoiceOver on Mac will read both
|
|
57
|
+
*/
|
|
58
|
+
placeholder?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Specify the role for the underlying `<input>`, defaults to `searchbox`
|
|
61
|
+
*/
|
|
62
|
+
role?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Optional prop to specify the type of the `<input>`
|
|
65
|
+
*/
|
|
66
|
+
type?: string;
|
|
67
|
+
/**
|
|
68
|
+
* Specify the value of the `<input>`
|
|
69
|
+
*/
|
|
70
|
+
value?: string | number;
|
|
71
|
+
}
|
|
72
|
+
declare const FluidSearch: React.FC<FluidSearchProps>;
|
|
73
|
+
export default FluidSearch;
|
|
@@ -101,6 +101,5 @@ FluidSearch.propTypes = {
|
|
|
101
101
|
*/
|
|
102
102
|
value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number])
|
|
103
103
|
};
|
|
104
|
-
var FluidSearch$1 = FluidSearch;
|
|
105
104
|
|
|
106
|
-
exports["default"] = FluidSearch
|
|
105
|
+
exports["default"] = FluidSearch;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { FluidSearchProps } from './FluidSearch';
|
|
8
|
+
import { FluidSearchSkeletonProps } from './FluidSearch.Skeleton';
|
|
9
|
+
export { default, default as FluidSearch } from './FluidSearch';
|
|
10
|
+
export { type FluidSearchProps, type FluidSearchSkeletonProps };
|
|
11
|
+
export { default as FluidSearchSkeleton } from './FluidSearch.Skeleton';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2022
|
|
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 FluidSelectSkeletonProps {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to add.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const FluidSelectSkeleton: React.FC<FluidSelectSkeletonProps>;
|
|
15
|
+
export default FluidSelectSkeleton;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2022
|
|
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 FluidSelectProps {
|
|
9
|
+
/**
|
|
10
|
+
* Provide the contents of your Select
|
|
11
|
+
*/
|
|
12
|
+
children?: React.ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Specify an optional className to be applied to the node containing the label and the select box
|
|
15
|
+
*/
|
|
16
|
+
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Optionally provide the default value of the `<select>`
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: any;
|
|
21
|
+
/**
|
|
22
|
+
* Specify whether the control is disabled
|
|
23
|
+
*/
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Specify a custom `id` for the `<select>`
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Specify if the currently value is invalid.
|
|
31
|
+
*/
|
|
32
|
+
invalid?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Message which is displayed if the value is invalid.
|
|
35
|
+
*/
|
|
36
|
+
invalidText?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Provide label text to be read by screen readers when interacting with the
|
|
39
|
+
* control
|
|
40
|
+
*/
|
|
41
|
+
labelText?: React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Provide an optional `onChange` hook that is called each time the value of
|
|
44
|
+
* the underlying `<input>` changes
|
|
45
|
+
*/
|
|
46
|
+
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
47
|
+
/**
|
|
48
|
+
* Specify whether the control is currently in warning state
|
|
49
|
+
*/
|
|
50
|
+
warn?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Provide the text that is displayed when the control is in warning state
|
|
53
|
+
*/
|
|
54
|
+
warnText?: React.ReactNode;
|
|
55
|
+
}
|
|
56
|
+
declare const FluidSelect: React.ForwardRefExoticComponent<FluidSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
57
|
+
export default FluidSelect;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2022
|
|
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 FluidSelect from './FluidSelect';
|
|
8
|
+
import FluidSelectSkeletonProps from './FluidSelect.Skeleton';
|
|
9
|
+
import FluidSelectProps from './FluidSelect.Skeleton';
|
|
10
|
+
export type { FluidSelectSkeletonProps, FluidSelectProps };
|
|
11
|
+
export default FluidSelect;
|
|
12
|
+
export { FluidSelect };
|
|
13
|
+
export { default as FluidSelectSkeleton } from './FluidSelect.Skeleton';
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
11
11
|
|
|
12
12
|
var FluidSelect = require('./FluidSelect.js');
|
|
13
|
+
var FluidSelect_Skeleton = require('./FluidSelect.Skeleton.js');
|
|
13
14
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
exports.FluidSelect = FluidSelect["default"];
|
|
17
18
|
exports["default"] = FluidSelect["default"];
|
|
19
|
+
exports.FluidSelectSkeleton = FluidSelect_Skeleton["default"];
|
|
@@ -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
|
/**
|