@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.
Files changed (150) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +1031 -1047
  2. package/es/components/AILabel/index.d.ts +37 -0
  3. package/es/components/AILabel/index.js +38 -14
  4. package/es/components/Accordion/Accordion.d.ts +5 -1
  5. package/es/components/Breadcrumb/BreadcrumbItem.js +1 -1
  6. package/es/components/Button/Button.d.ts +2 -1
  7. package/es/components/Button/Button.js +14 -3
  8. package/es/components/CodeSnippet/CodeSnippet.d.ts +9 -1
  9. package/es/components/CodeSnippet/CodeSnippet.js +7 -0
  10. package/es/components/ComboBox/ComboBox.js +37 -14
  11. package/es/components/ComboButton/index.js +1 -1
  12. package/es/components/Copy/Copy.d.ts +9 -1
  13. package/es/components/Copy/Copy.js +6 -0
  14. package/es/components/CopyButton/CopyButton.d.ts +9 -1
  15. package/es/components/CopyButton/CopyButton.js +6 -0
  16. package/es/components/DataTable/TableExpandHeader.d.ts +2 -2
  17. package/es/components/DataTable/TableExpandHeader.js +1 -1
  18. package/es/components/DatePicker/DatePicker.js +1 -0
  19. package/es/components/Dropdown/Dropdown.js +2 -2
  20. package/es/components/FeatureFlags/index.js +27 -7
  21. package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +15 -0
  22. package/es/components/FluidNumberInput/FluidNumberInput.d.ts +95 -0
  23. package/es/components/FluidNumberInput/index.d.ts +11 -0
  24. package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +15 -0
  25. package/es/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
  26. package/es/components/FluidSearch/FluidSearch.d.ts +73 -0
  27. package/es/components/FluidSearch/FluidSearch.js +1 -2
  28. package/es/components/FluidSearch/index.d.ts +11 -0
  29. package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +15 -0
  30. package/es/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
  31. package/es/components/FluidSelect/FluidSelect.d.ts +57 -0
  32. package/es/components/FluidSelect/FluidSelect.js +1 -2
  33. package/es/components/FluidSelect/index.d.ts +13 -0
  34. package/es/components/FluidSelect/index.js +1 -0
  35. package/es/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +20 -0
  36. package/es/components/FluidTextArea/FluidTextArea.Skeleton.js +3 -20
  37. package/es/components/FluidTextArea/FluidTextArea.d.ts +96 -0
  38. package/es/components/FluidTextArea/FluidTextArea.js +2 -2
  39. package/es/components/FluidTextArea/index.d.ts +12 -0
  40. package/es/components/FluidTextInput/FluidPasswordInput.d.ts +83 -0
  41. package/es/components/FluidTextInput/FluidPasswordInput.js +87 -0
  42. package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +15 -0
  43. package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
  44. package/es/components/FluidTextInput/FluidTextInput.d.ts +70 -0
  45. package/es/components/FluidTextInput/FluidTextInput.js +6 -4
  46. package/es/components/FluidTextInput/index.d.ts +15 -0
  47. package/es/components/FluidTextInput/index.js +2 -0
  48. package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.d.ts +35 -0
  49. package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +4 -2
  50. package/es/components/FluidTimePicker/FluidTimePicker.d.ts +45 -0
  51. package/es/components/FluidTimePicker/FluidTimePicker.js +5 -5
  52. package/es/components/FluidTimePicker/index.d.ts +13 -0
  53. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +41 -0
  54. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
  55. package/es/components/FluidTimePickerSelect/index.d.ts +11 -0
  56. package/es/components/IconButton/index.d.ts +4 -0
  57. package/es/components/IconButton/index.js +6 -0
  58. package/es/components/Menu/Menu.js +2 -1
  59. package/es/components/MultiSelect/FilterableMultiSelect.js +6 -5
  60. package/es/components/MultiSelect/MultiSelect.js +2 -1
  61. package/es/components/Notification/Notification.js +4 -2
  62. package/es/components/OverflowMenu/next/index.js +3 -1
  63. package/es/components/OverflowMenuV2/index.js +1 -3
  64. package/es/components/Pagination/Pagination.js +1 -1
  65. package/es/components/Popover/index.js +2 -2
  66. package/es/components/Tabs/Tabs.js +1 -1
  67. package/es/components/Tag/DismissibleTag.d.ts +9 -1
  68. package/es/components/Tag/DismissibleTag.js +7 -3
  69. package/es/components/Tag/Tag.js +2 -2
  70. package/es/components/Toggletip/index.js +2 -1
  71. package/es/components/UIShell/HeaderPanel.js +1 -1
  72. package/es/index.js +12 -11
  73. package/es/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +757 -4
  74. package/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +76 -0
  75. package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +106 -6
  76. package/lib/components/AILabel/index.d.ts +37 -0
  77. package/lib/components/AILabel/index.js +38 -14
  78. package/lib/components/Accordion/Accordion.d.ts +5 -1
  79. package/lib/components/Breadcrumb/BreadcrumbItem.js +1 -1
  80. package/lib/components/Button/Button.d.ts +2 -1
  81. package/lib/components/Button/Button.js +13 -2
  82. package/lib/components/CodeSnippet/CodeSnippet.d.ts +9 -1
  83. package/lib/components/CodeSnippet/CodeSnippet.js +7 -0
  84. package/lib/components/ComboBox/ComboBox.js +38 -15
  85. package/lib/components/ComboButton/index.js +2 -2
  86. package/lib/components/Copy/Copy.d.ts +9 -1
  87. package/lib/components/Copy/Copy.js +6 -0
  88. package/lib/components/CopyButton/CopyButton.d.ts +9 -1
  89. package/lib/components/CopyButton/CopyButton.js +6 -0
  90. package/lib/components/DataTable/TableExpandHeader.d.ts +2 -2
  91. package/lib/components/DataTable/TableExpandHeader.js +1 -1
  92. package/lib/components/DatePicker/DatePicker.js +1 -0
  93. package/lib/components/Dropdown/Dropdown.js +3 -3
  94. package/lib/components/FeatureFlags/index.js +27 -7
  95. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +15 -0
  96. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +95 -0
  97. package/lib/components/FluidNumberInput/index.d.ts +11 -0
  98. package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +15 -0
  99. package/lib/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
  100. package/lib/components/FluidSearch/FluidSearch.d.ts +73 -0
  101. package/lib/components/FluidSearch/FluidSearch.js +1 -2
  102. package/lib/components/FluidSearch/index.d.ts +11 -0
  103. package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +15 -0
  104. package/lib/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
  105. package/lib/components/FluidSelect/FluidSelect.d.ts +57 -0
  106. package/lib/components/FluidSelect/FluidSelect.js +1 -2
  107. package/lib/components/FluidSelect/index.d.ts +13 -0
  108. package/lib/components/FluidSelect/index.js +2 -0
  109. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.d.ts +20 -0
  110. package/lib/components/FluidTextArea/FluidTextArea.Skeleton.js +3 -22
  111. package/lib/components/FluidTextArea/FluidTextArea.d.ts +96 -0
  112. package/lib/components/FluidTextArea/FluidTextArea.js +2 -2
  113. package/lib/components/FluidTextArea/index.d.ts +12 -0
  114. package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -0
  115. package/lib/components/FluidTextInput/FluidPasswordInput.js +93 -0
  116. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +15 -0
  117. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
  118. package/lib/components/FluidTextInput/FluidTextInput.d.ts +70 -0
  119. package/lib/components/FluidTextInput/FluidTextInput.js +6 -4
  120. package/lib/components/FluidTextInput/index.d.ts +15 -0
  121. package/lib/components/FluidTextInput/index.js +3 -0
  122. package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.d.ts +35 -0
  123. package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +4 -2
  124. package/lib/components/FluidTimePicker/FluidTimePicker.d.ts +45 -0
  125. package/lib/components/FluidTimePicker/FluidTimePicker.js +6 -6
  126. package/lib/components/FluidTimePicker/index.d.ts +13 -0
  127. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +41 -0
  128. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
  129. package/lib/components/FluidTimePickerSelect/index.d.ts +11 -0
  130. package/lib/components/IconButton/index.d.ts +4 -0
  131. package/lib/components/IconButton/index.js +6 -0
  132. package/lib/components/Menu/Menu.js +2 -1
  133. package/lib/components/MultiSelect/FilterableMultiSelect.js +7 -6
  134. package/lib/components/MultiSelect/MultiSelect.js +3 -2
  135. package/lib/components/Notification/Notification.js +4 -2
  136. package/lib/components/OverflowMenu/next/index.js +3 -1
  137. package/lib/components/OverflowMenuV2/index.js +1 -3
  138. package/lib/components/Pagination/Pagination.js +1 -1
  139. package/lib/components/Popover/index.js +3 -3
  140. package/lib/components/Tabs/Tabs.js +1 -1
  141. package/lib/components/Tag/DismissibleTag.d.ts +9 -1
  142. package/lib/components/Tag/DismissibleTag.js +7 -3
  143. package/lib/components/Tag/Tag.js +2 -2
  144. package/lib/components/Toggletip/index.js +2 -1
  145. package/lib/components/UIShell/HeaderPanel.js +1 -1
  146. package/lib/index.js +23 -22
  147. package/lib/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +763 -2
  148. package/lib/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +80 -0
  149. package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +121 -5
  150. package/package.json +10 -10
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ export interface FluidTextAreaProps {
9
+ /**
10
+ * Provide a custom className that is applied directly to the underlying
11
+ * `<textarea>` node
12
+ */
13
+ className?: string;
14
+ /**
15
+ * Specify the `cols` attribute for the underlying `<textarea>` node
16
+ */
17
+ cols?: number;
18
+ /**
19
+ * Optionally provide the default value of the `<textarea>`
20
+ */
21
+ defaultValue?: string | number;
22
+ /**
23
+ * Specify whether the control is disabled
24
+ */
25
+ disabled?: boolean;
26
+ /**
27
+ * Specify whether to display the character counter
28
+ */
29
+ enableCounter?: boolean;
30
+ /**
31
+ * Provide text that is used alongside the control label for additional help
32
+ */
33
+ helperText?: React.ReactNode;
34
+ /**
35
+ * Specify whether you want the underlying label to be visually hidden
36
+ */
37
+ hideLabel?: boolean;
38
+ /**
39
+ * Provide a unique identifier for the control
40
+ */
41
+ id?: string;
42
+ /**
43
+ * Specify whether the control is currently invalid
44
+ */
45
+ invalid?: boolean;
46
+ /**
47
+ * Provide the text that is displayed when the control is in an invalid state
48
+ */
49
+ invalidText?: React.ReactNode;
50
+ /**
51
+ * Provide the text that will be read by a screen reader when visiting this
52
+ * control
53
+ */
54
+ labelText: React.ReactNode;
55
+ /**
56
+ * `true` to use the light version. For use on $ui-01 backgrounds only.
57
+ * Don't use this to make tile background color same as container background color.
58
+ */
59
+ light?: boolean;
60
+ /**
61
+ * Max character count allowed for the textarea. This is needed in order for enableCounter to display
62
+ */
63
+ maxCount?: number;
64
+ /**
65
+ * Optionally provide an `onChange` handler that is called whenever `<textarea>`
66
+ * is updated
67
+ */
68
+ onChange?: React.ChangeEventHandler<HTMLTextAreaElement>;
69
+ /**
70
+ * Optionally provide an `onClick` handler that is called whenever the
71
+ * `<textarea>` is clicked
72
+ */
73
+ onClick?: React.MouseEventHandler<HTMLTextAreaElement>;
74
+ /**
75
+ * Specify the placeholder attribute for the `<textarea>`
76
+ */
77
+ placeholder?: string;
78
+ /**
79
+ * Specify the rows attribute for the `<textarea>`
80
+ */
81
+ rows?: number;
82
+ /**
83
+ * Provide the current value of the `<textarea>`
84
+ */
85
+ value?: string | number;
86
+ /**
87
+ * Specify whether the control is currently in warning state
88
+ */
89
+ warn?: boolean;
90
+ /**
91
+ * Provide the text that is displayed when the control is in warning state
92
+ */
93
+ warnText?: React.ReactNode;
94
+ }
95
+ declare const FluidTextArea: React.FC<FluidTextAreaProps>;
96
+ export default FluidTextArea;
@@ -25,7 +25,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
25
25
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
26
26
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
27
27
 
28
- function FluidTextArea(_ref) {
28
+ const FluidTextArea = _ref => {
29
29
  let {
30
30
  className,
31
31
  ...other
@@ -39,7 +39,7 @@ function FluidTextArea(_ref) {
39
39
  }, /*#__PURE__*/React__default["default"].createElement(TextArea["default"], _rollupPluginBabelHelpers["extends"]({
40
40
  className: classNames
41
41
  }, other)));
42
- }
42
+ };
43
43
  FluidTextArea.propTypes = {
44
44
  /**
45
45
  * Provide a custom className that is applied directly to the underlying
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import FluidTextArea from './FluidTextArea';
8
+ import { type FluidTextAreaProps } from './FluidTextArea';
9
+ import { type FluidTextAreaSkeletonProps } from './FluidTextArea.Skeleton';
10
+ export default FluidTextArea;
11
+ export { FluidTextArea, type FluidTextAreaProps, type FluidTextAreaSkeletonProps, };
12
+ export { default as FluidTextAreaSkeleton } from './FluidTextArea.Skeleton';
@@ -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;
@@ -0,0 +1,93 @@
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
+ 'use strict';
9
+
10
+ var PropTypes = require('prop-types');
11
+ require('react');
12
+ require('classnames');
13
+ require('../TextInput/ControlledPasswordInput.js');
14
+ require('../TextInput/PasswordInput.js');
15
+
16
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
+
18
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
19
+
20
+ ({
21
+ /**
22
+ * Specify an optional className to be applied to the outer FluidForm wrapper
23
+ */
24
+ className: PropTypes__default["default"].string,
25
+ /**
26
+ * Optionally provide the default value of the `<input>`
27
+ */
28
+ defaultValue: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number]),
29
+ /**
30
+ * Specify whether the `<input>` should be disabled
31
+ */
32
+ disabled: PropTypes__default["default"].bool,
33
+ /**
34
+ * "Hide password" tooltip text on password visibility toggle
35
+ */
36
+ hidePasswordLabel: PropTypes__default["default"].string,
37
+ /**
38
+ * Specify a custom `id` for the `<input>`
39
+ */
40
+ id: PropTypes__default["default"].string.isRequired,
41
+ /**
42
+ * Specify whether the control is currently invalid
43
+ */
44
+ invalid: PropTypes__default["default"].bool,
45
+ /**
46
+ * Provide the text that is displayed when the control is in an invalid state
47
+ */
48
+ invalidText: PropTypes__default["default"].node,
49
+ /**
50
+ * Specify whether the control is a password input
51
+ */
52
+ isPassword: PropTypes__default["default"].bool,
53
+ /**
54
+ * Provide the text that will be read by a screen reader when visiting this
55
+ * control
56
+ */
57
+ labelText: PropTypes__default["default"].node.isRequired,
58
+ /**
59
+ * Optionally provide an `onChange` handler that is called whenever `<input>`
60
+ * is updated
61
+ */
62
+ onChange: PropTypes__default["default"].func,
63
+ /**
64
+ * Optionally provide an `onClick` handler that is called whenever the
65
+ * `<input>` is clicked
66
+ */
67
+ onClick: PropTypes__default["default"].func,
68
+ /**
69
+ * Callback function that is called whenever the toggle password visibility
70
+ * button is clicked
71
+ */
72
+ onTogglePasswordVisibility: PropTypes__default["default"].func,
73
+ /**
74
+ * Specify the placeholder attribute for the `<input>`
75
+ */
76
+ placeholder: PropTypes__default["default"].string,
77
+ /**
78
+ * "Show password" tooltip text on password visibility toggle
79
+ */
80
+ showPasswordLabel: PropTypes__default["default"].string,
81
+ /**
82
+ * Specify the value of the `<input>`
83
+ */
84
+ value: PropTypes__default["default"].oneOfType([PropTypes__default["default"].string, PropTypes__default["default"].number]),
85
+ /**
86
+ * Specify whether the control is currently in warning state
87
+ */
88
+ warn: PropTypes__default["default"].bool,
89
+ /**
90
+ * Provide the text that is displayed when the control is in warning state
91
+ */
92
+ warnText: PropTypes__default["default"].node
93
+ });
@@ -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 FluidTextInputSkeletonProps {
9
+ /**
10
+ * Specify an optional className to be applied to the outer FluidForm wrapper
11
+ */
12
+ className?: string;
13
+ }
14
+ declare const FluidTextInputSkeleton: React.FC<FluidTextInputSkeletonProps>;
15
+ export default FluidTextInputSkeleton;
@@ -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
- function FluidTextInputSkeleton(_ref) {
25
+ const FluidTextInputSkeleton = _ref => {
26
26
  let {
27
27
  className,
28
28
  ...other
@@ -39,7 +39,7 @@ function FluidTextInputSkeleton(_ref) {
39
39
  }), /*#__PURE__*/React__default["default"].createElement("div", {
40
40
  className: `${prefix}--skeleton ${prefix}--text-input`
41
41
  })));
42
- }
42
+ };
43
43
  FluidTextInputSkeleton.propTypes = {
44
44
  /**
45
45
  * Specify an optional className to be applied to the outer FluidForm wrapper
@@ -0,0 +1,70 @@
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 FluidTextInputProps {
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
+ * Specify a custom `id` for the `<input>`
23
+ */
24
+ id: string;
25
+ /**
26
+ * Specify whether the control is currently invalid
27
+ */
28
+ invalid?: boolean;
29
+ /**
30
+ * Provide the text that is displayed when the control is in an invalid state
31
+ */
32
+ invalidText?: React.ReactNode;
33
+ /**
34
+ * Specify whether the control is a password input
35
+ */
36
+ isPassword?: boolean;
37
+ /**
38
+ * Provide the text that will be read by a screen reader when visiting this
39
+ * control
40
+ */
41
+ labelText: React.ReactNode;
42
+ /**
43
+ * Optionally provide an `onChange` handler that is called whenever `<input>`
44
+ * is updated
45
+ */
46
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
47
+ /**
48
+ * Optionally provide an `onClick` handler that is called whenever the
49
+ * `<input>` is clicked
50
+ */
51
+ onClick?: (event: React.MouseEvent<HTMLElement>) => void;
52
+ /**
53
+ * Specify the placeholder attribute for the `<input>`
54
+ */
55
+ placeholder?: string;
56
+ /**
57
+ * Specify the value of the `<input>`
58
+ */
59
+ value?: string | number;
60
+ /**
61
+ * Specify whether the control is currently in warning state
62
+ */
63
+ warn?: boolean;
64
+ /**
65
+ * Provide the text that is displayed when the control is in warning state
66
+ */
67
+ warnText?: React.ReactNode;
68
+ }
69
+ declare const FluidTextInput: React.ForwardRefExoticComponent<FluidTextInputProps & React.RefAttributes<HTMLInputElement>>;
70
+ export default FluidTextInput;
@@ -26,7 +26,7 @@ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
26
26
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
27
27
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
28
28
 
29
- function FluidTextInput(_ref) {
29
+ const FluidTextInput = /*#__PURE__*/React__default["default"].forwardRef(function FluidTextInput(_ref, ref) {
30
30
  let {
31
31
  className,
32
32
  isPassword,
@@ -41,11 +41,13 @@ function FluidTextInput(_ref) {
41
41
  isFluid: true
42
42
  }
43
43
  }, isPassword ? /*#__PURE__*/React__default["default"].createElement(PasswordInput["default"], _rollupPluginBabelHelpers["extends"]({
44
- className: classNames
44
+ className: classNames,
45
+ ref: ref
45
46
  }, other)) : /*#__PURE__*/React__default["default"].createElement(TextInput["default"], _rollupPluginBabelHelpers["extends"]({
46
- className: classNames
47
+ className: classNames,
48
+ ref: ref
47
49
  }, other)));
48
- }
50
+ });
49
51
  FluidTextInput.propTypes = {
50
52
  /**
51
53
  * Specify an optional className to be applied to the outer FluidForm wrapper
@@ -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 FluidTextInput from './FluidTextInput';
8
+ import FluidPasswordInput from './FluidPasswordInput';
9
+ import { type FluidTextInputSkeletonProps } from './FluidTextInput.Skeleton';
10
+ import { type FluidPasswordInputProps } from './FluidPasswordInput';
11
+ import { type FluidTextInputProps } from './FluidTextInput';
12
+ export default FluidTextInput;
13
+ export { FluidTextInput, type FluidTextInputProps, type FluidTextInputSkeletonProps, };
14
+ export { FluidPasswordInput, type FluidPasswordInputProps };
15
+ export { default as FluidTextInputSkeleton } from './FluidTextInput.Skeleton';
@@ -10,8 +10,11 @@
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
12
  var FluidTextInput = require('./FluidTextInput.js');
13
+ require('./FluidPasswordInput.js');
14
+ var FluidTextInput_Skeleton = require('./FluidTextInput.Skeleton.js');
13
15
 
14
16
 
15
17
 
16
18
  exports.FluidTextInput = FluidTextInput["default"];
17
19
  exports["default"] = FluidTextInput["default"];
20
+ exports.FluidTextInputSkeleton = FluidTextInput_Skeleton["default"];
@@ -0,0 +1,35 @@
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 PropTypes from 'prop-types';
8
+ export interface FluidTimePickerSkeletonProps {
9
+ /**
10
+ * Specify an optional className to add.
11
+ */
12
+ className?: string;
13
+ /**
14
+ * Specify if there are only two TimePicker elements
15
+ */
16
+ isOnlyTwo?: boolean;
17
+ }
18
+ declare const FluidTimePickerSkeleton: {
19
+ ({ className, isOnlyTwo, ...rest }: {
20
+ [x: string]: any;
21
+ className: any;
22
+ isOnlyTwo: any;
23
+ }): import("react/jsx-runtime").JSX.Element;
24
+ propTypes: {
25
+ /**
26
+ * Specify an optional className to add.
27
+ */
28
+ className: PropTypes.Requireable<string>;
29
+ /**
30
+ * Specify if there are only two TimePicker elements
31
+ */
32
+ isOnlyTwo: PropTypes.Requireable<boolean>;
33
+ };
34
+ };
35
+ export default FluidTimePickerSkeleton;
@@ -14,7 +14,10 @@ var PropTypes = require('prop-types');
14
14
  var React = require('react');
15
15
  var cx = require('classnames');
16
16
  var usePrefix = require('../../internal/usePrefix.js');
17
+ require('../FluidTextInput/FluidTextInput.js');
18
+ require('../FluidTextInput/FluidPasswordInput.js');
17
19
  var FluidTextInput_Skeleton = require('../FluidTextInput/FluidTextInput.Skeleton.js');
20
+ require('../FluidSelect/FluidSelect.js');
18
21
  var FluidSelect_Skeleton = require('../FluidSelect/FluidSelect.Skeleton.js');
19
22
 
20
23
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -48,6 +51,5 @@ FluidTimePickerSkeleton.propTypes = {
48
51
  */
49
52
  isOnlyTwo: PropTypes__default["default"].bool
50
53
  };
51
- var FluidTimePickerSkeleton$1 = FluidTimePickerSkeleton;
52
54
 
53
- exports["default"] = FluidTimePickerSkeleton$1;
55
+ exports["default"] = FluidTimePickerSkeleton;
@@ -0,0 +1,45 @@
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
+ import { FluidTextInputProps } from '../FluidTextInput';
9
+ export interface FluidTimePickerProps extends FluidTextInputProps {
10
+ /**
11
+ * The child node(s)
12
+ */
13
+ children?: React.ReactNode;
14
+ /**
15
+ * Specify an optional className to be applied to the outer FluidTimePicker wrapper
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Specify whether the `<input>` should be disabled
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * Specify whether or not the control is invalid
24
+ */
25
+ invalid?: boolean;
26
+ /**
27
+ * Provide the text that is displayed when the control is in error state
28
+ */
29
+ invalidText?: React.ReactNode;
30
+ /**
31
+ * Provide the text that will be read by a screen reader when visiting this
32
+ * control
33
+ */
34
+ labelText: React.ReactNode;
35
+ /**
36
+ * Specify whether the control is currently in warning state
37
+ */
38
+ warn?: boolean;
39
+ /**
40
+ * Provide the text that is displayed when the control is in warning state
41
+ */
42
+ warnText?: React.ReactNode;
43
+ }
44
+ declare const FluidTimePicker: React.ForwardRefExoticComponent<FluidTimePickerProps & React.RefAttributes<HTMLInputElement>>;
45
+ export default FluidTimePicker;
@@ -10,17 +10,19 @@
10
10
  Object.defineProperty(exports, '__esModule', { value: true });
11
11
 
12
12
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
13
- var PropTypes = require('prop-types');
14
13
  var React = require('react');
14
+ var PropTypes = require('prop-types');
15
15
  var cx = require('classnames');
16
16
  var FluidTextInput = require('../FluidTextInput/FluidTextInput.js');
17
+ require('../FluidTextInput/FluidPasswordInput.js');
18
+ require('../FluidTextInput/FluidTextInput.Skeleton.js');
17
19
  var usePrefix = require('../../internal/usePrefix.js');
18
20
  var iconsReact = require('@carbon/icons-react');
19
21
 
20
22
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
21
23
 
22
- var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
23
24
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
25
+ var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
24
26
  var cx__default = /*#__PURE__*/_interopDefaultLegacy(cx);
25
27
 
26
28
  const FluidTimePicker = /*#__PURE__*/React__default["default"].forwardRef(function FluidTimePicker(_ref, ref) {
@@ -37,7 +39,7 @@ const FluidTimePicker = /*#__PURE__*/React__default["default"].forwardRef(functi
37
39
  const prefix = usePrefix.usePrefix();
38
40
  const classNames = cx__default["default"](className, {
39
41
  [`${prefix}--time-picker--fluid`]: true,
40
- [`${prefix}--time-picker--equal-width`]: children?.length !== 2,
42
+ [`${prefix}--time-picker--equal-width`]: React__default["default"].Children.toArray(children).length !== 2,
41
43
  [`${prefix}--time-picker--fluid--disabled`]: disabled,
42
44
  [`${prefix}--time-picker--fluid--invalid`]: invalid,
43
45
  [`${prefix}--time-picker--fluid--warning`]: warn
@@ -58,7 +60,6 @@ const FluidTimePicker = /*#__PURE__*/React__default["default"].forwardRef(functi
58
60
  }, /*#__PURE__*/React__default["default"].createElement("div", {
59
61
  className: `${prefix}--time-picker__input`
60
62
  }, /*#__PURE__*/React__default["default"].createElement(FluidTextInput["default"], _rollupPluginBabelHelpers["extends"]({
61
- disabled: disabled,
62
63
  ref: ref
63
64
  }, other))), disabled ? React__default["default"].Children.toArray(children).map(child => {
64
65
  return /*#__PURE__*/React__default["default"].cloneElement(child, {
@@ -109,6 +110,5 @@ FluidTimePicker.propTypes = {
109
110
  */
110
111
  warnText: PropTypes__default["default"].node
111
112
  };
112
- var FluidTimePicker$1 = FluidTimePicker;
113
113
 
114
- exports["default"] = FluidTimePicker$1;
114
+ exports["default"] = FluidTimePicker;
@@ -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 FluidTimePicker from './FluidTimePicker';
8
+ import { FluidTimePickerProps } from './FluidTimePicker';
9
+ import { FluidTimePickerSkeletonProps } from './FluidTimePicker.Skeleton';
10
+ export { default as FluidTimePickerSkeleton } from './FluidTimePicker.Skeleton';
11
+ export type { FluidTimePickerProps, FluidTimePickerSkeletonProps };
12
+ export default FluidTimePicker;
13
+ export { FluidTimePicker };
@@ -0,0 +1,41 @@
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 FluidTimePickerSelectProps {
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
+ * Provide label text to be read by screen readers when interacting with the
31
+ * control
32
+ */
33
+ labelText?: React.ReactNode;
34
+ /**
35
+ * Provide an optional `onChange` hook that is called each time the value of
36
+ * the underlying `<input>` changes
37
+ */
38
+ onChange?: React.ChangeEventHandler<HTMLSelectElement>;
39
+ }
40
+ declare const FluidTimePickerSelect: React.ForwardRefExoticComponent<FluidTimePickerSelectProps & React.RefAttributes<HTMLSelectElement>>;
41
+ export default FluidTimePickerSelect;