@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
|
@@ -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;
|
|
@@ -12,7 +12,7 @@ import cx from 'classnames';
|
|
|
12
12
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
13
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const FluidSearchSkeleton = _ref => {
|
|
16
16
|
let {
|
|
17
17
|
className,
|
|
18
18
|
...other
|
|
@@ -29,7 +29,7 @@ function FluidSearchSkeleton(_ref) {
|
|
|
29
29
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
30
30
|
className: `${prefix}--skeleton ${prefix}--text-input`
|
|
31
31
|
})));
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
FluidSearchSkeleton.propTypes = {
|
|
34
34
|
/**
|
|
35
35
|
* 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;
|
|
@@ -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';
|
|
@@ -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;
|
|
@@ -5,30 +5,13 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import { extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
|
9
8
|
import PropTypes from 'prop-types';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
9
|
+
import 'react';
|
|
10
|
+
import 'classnames';
|
|
12
11
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
13
|
-
import { FormContext } from '../FluidForm/FormContext.js';
|
|
14
12
|
|
|
15
13
|
function FluidTextAreaSkeleton(_ref) {
|
|
16
|
-
|
|
17
|
-
className,
|
|
18
|
-
...other
|
|
19
|
-
} = _ref;
|
|
20
|
-
const prefix = usePrefix();
|
|
21
|
-
return /*#__PURE__*/React__default.createElement(FormContext.Provider, {
|
|
22
|
-
value: {
|
|
23
|
-
isFluid: true
|
|
24
|
-
}
|
|
25
|
-
}, /*#__PURE__*/React__default.createElement("div", _extends({
|
|
26
|
-
className: cx(`${prefix}--form-item ${prefix}--text-area--fluid__skeleton`, className)
|
|
27
|
-
}, other), /*#__PURE__*/React__default.createElement("span", {
|
|
28
|
-
className: `${prefix}--label ${prefix}--skeleton`
|
|
29
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
30
|
-
className: `${prefix}--skeleton ${prefix}--text-area`
|
|
31
|
-
})));
|
|
14
|
+
usePrefix();
|
|
32
15
|
}
|
|
33
16
|
FluidTextAreaSkeleton.propTypes = {
|
|
34
17
|
/**
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export interface FluidTextAreaProps {
|
|
9
|
+
/**
|
|
10
|
+
* Provide a custom className that is applied directly to the underlying
|
|
11
|
+
* `<textarea>` node
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Specify the `cols` attribute for the underlying `<textarea>` node
|
|
16
|
+
*/
|
|
17
|
+
cols?: number;
|
|
18
|
+
/**
|
|
19
|
+
* Optionally provide the default value of the `<textarea>`
|
|
20
|
+
*/
|
|
21
|
+
defaultValue?: string | number;
|
|
22
|
+
/**
|
|
23
|
+
* Specify whether the control is disabled
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Specify whether to display the character counter
|
|
28
|
+
*/
|
|
29
|
+
enableCounter?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Provide text that is used alongside the control label for additional help
|
|
32
|
+
*/
|
|
33
|
+
helperText?: React.ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Specify whether you want the underlying label to be visually hidden
|
|
36
|
+
*/
|
|
37
|
+
hideLabel?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Provide a unique identifier for the control
|
|
40
|
+
*/
|
|
41
|
+
id?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Specify whether the control is currently invalid
|
|
44
|
+
*/
|
|
45
|
+
invalid?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Provide the text that is displayed when the control is in an invalid state
|
|
48
|
+
*/
|
|
49
|
+
invalidText?: React.ReactNode;
|
|
50
|
+
/**
|
|
51
|
+
* Provide the text that will be read by a screen reader when visiting this
|
|
52
|
+
* control
|
|
53
|
+
*/
|
|
54
|
+
labelText: React.ReactNode;
|
|
55
|
+
/**
|
|
56
|
+
* `true` to use the light version. For use on $ui-01 backgrounds only.
|
|
57
|
+
* Don't use this to make tile background color same as container background color.
|
|
58
|
+
*/
|
|
59
|
+
light?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Max character count allowed for the textarea. This is needed in order for enableCounter to display
|
|
62
|
+
*/
|
|
63
|
+
maxCount?: number;
|
|
64
|
+
/**
|
|
65
|
+
* Optionally provide an `onChange` handler that is called whenever `<textarea>`
|
|
66
|
+
* is updated
|
|
67
|
+
*/
|
|
68
|
+
onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
69
|
+
/**
|
|
70
|
+
* Optionally provide an `onClick` handler that is called whenever the
|
|
71
|
+
* `<textarea>` is clicked
|
|
72
|
+
*/
|
|
73
|
+
onClick?: React.MouseEventHandler<HTMLTextAreaElement>;
|
|
74
|
+
/**
|
|
75
|
+
* Specify the placeholder attribute for the `<textarea>`
|
|
76
|
+
*/
|
|
77
|
+
placeholder?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Specify the rows attribute for the `<textarea>`
|
|
80
|
+
*/
|
|
81
|
+
rows?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Provide the current value of the `<textarea>`
|
|
84
|
+
*/
|
|
85
|
+
value?: string | number;
|
|
86
|
+
/**
|
|
87
|
+
* Specify whether the control is currently in warning state
|
|
88
|
+
*/
|
|
89
|
+
warn?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Provide the text that is displayed when the control is in warning state
|
|
92
|
+
*/
|
|
93
|
+
warnText?: React.ReactNode;
|
|
94
|
+
}
|
|
95
|
+
declare const FluidTextArea: React.FC<FluidTextAreaProps>;
|
|
96
|
+
export default FluidTextArea;
|
|
@@ -15,7 +15,7 @@ import deprecate from '../../prop-types/deprecate.js';
|
|
|
15
15
|
import { usePrefix } from '../../internal/usePrefix.js';
|
|
16
16
|
import { FormContext } from '../FluidForm/FormContext.js';
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
const FluidTextArea = _ref => {
|
|
19
19
|
let {
|
|
20
20
|
className,
|
|
21
21
|
...other
|
|
@@ -29,7 +29,7 @@ function FluidTextArea(_ref) {
|
|
|
29
29
|
}, /*#__PURE__*/React__default.createElement(TextArea, _extends({
|
|
30
30
|
className: classNames
|
|
31
31
|
}, other)));
|
|
32
|
-
}
|
|
32
|
+
};
|
|
33
33
|
FluidTextArea.propTypes = {
|
|
34
34
|
/**
|
|
35
35
|
* Provide a custom className that is applied directly to the underlying
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright IBM Corp. 2016, 2023
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import FluidTextArea from './FluidTextArea';
|
|
8
|
+
import { type FluidTextAreaProps } from './FluidTextArea';
|
|
9
|
+
import { type FluidTextAreaSkeletonProps } from './FluidTextArea.Skeleton';
|
|
10
|
+
export default FluidTextArea;
|
|
11
|
+
export { FluidTextArea, type FluidTextAreaProps, type FluidTextAreaSkeletonProps, };
|
|
12
|
+
export { default as FluidTextAreaSkeleton } from './FluidTextArea.Skeleton';
|
|
@@ -0,0 +1,83 @@
|
|
|
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 FluidPasswordInputProps {
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to be applied to the outer FluidForm wrapper
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Optionally provide the default value of the `<input>`
|
|
15
|
+
*/
|
|
16
|
+
defaultValue?: string | number;
|
|
17
|
+
/**
|
|
18
|
+
* Specify whether the `<input>` should be disabled
|
|
19
|
+
*/
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* "Hide password" tooltip text on password visibility toggle
|
|
23
|
+
*/
|
|
24
|
+
hidePasswordLabel?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Specify a custom `id` for the `<input>`
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
/**
|
|
30
|
+
* Specify whether the control is currently invalid
|
|
31
|
+
*/
|
|
32
|
+
invalid?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* Provide the text that is displayed when the control is in an invalid state
|
|
35
|
+
*/
|
|
36
|
+
invalidText?: React.ReactNode;
|
|
37
|
+
/**
|
|
38
|
+
* Specify whether the control is a password input
|
|
39
|
+
*/
|
|
40
|
+
isPassword?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Provide the text that will be read by a screen reader when visiting this
|
|
43
|
+
* control
|
|
44
|
+
*/
|
|
45
|
+
labelText: React.ReactNode;
|
|
46
|
+
/**
|
|
47
|
+
* Optionally provide an `onChange` handler that is called whenever `<input>`
|
|
48
|
+
* is updated
|
|
49
|
+
*/
|
|
50
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
51
|
+
/**
|
|
52
|
+
* Optionally provide an `onClick` handler that is called whenever the
|
|
53
|
+
* `<input>` is clicked
|
|
54
|
+
*/
|
|
55
|
+
onClick?: React.MouseEventHandler<HTMLInputElement>;
|
|
56
|
+
/**
|
|
57
|
+
* Callback function that is called whenever the toggle password visibility
|
|
58
|
+
* button is clicked
|
|
59
|
+
*/
|
|
60
|
+
onTogglePasswordVisibility?: React.MouseEventHandler<HTMLButtonElement>;
|
|
61
|
+
/**
|
|
62
|
+
* Specify the placeholder attribute for the `<input>`
|
|
63
|
+
*/
|
|
64
|
+
placeholder?: string;
|
|
65
|
+
/**
|
|
66
|
+
* "Show password" tooltip text on password visibility toggle
|
|
67
|
+
*/
|
|
68
|
+
showPasswordLabel?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Specify the value of the `<input>`
|
|
71
|
+
*/
|
|
72
|
+
value?: string | number;
|
|
73
|
+
/**
|
|
74
|
+
* Specify whether the control is currently in warning state
|
|
75
|
+
*/
|
|
76
|
+
warn?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Provide the text that is displayed when the control is in warning state
|
|
79
|
+
*/
|
|
80
|
+
warnText?: React.ReactNode;
|
|
81
|
+
}
|
|
82
|
+
declare const FluidPasswordInput: React.FC<FluidPasswordInputProps>;
|
|
83
|
+
export default FluidPasswordInput;
|