@carbon/react 1.66.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 (100) hide show
  1. package/.playwright/INTERNAL_AVT_REPORT_DO_NOT_USE.json +971 -911
  2. package/es/components/ComboBox/ComboBox.js +11 -2
  3. package/es/components/ComboButton/index.js +1 -1
  4. package/es/components/DataTable/TableExpandHeader.d.ts +2 -2
  5. package/es/components/DataTable/TableExpandHeader.js +1 -1
  6. package/es/components/DatePicker/DatePicker.js +1 -0
  7. package/es/components/Dropdown/Dropdown.js +1 -1
  8. package/es/components/FeatureFlags/index.js +27 -7
  9. package/es/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +15 -0
  10. package/es/components/FluidNumberInput/FluidNumberInput.d.ts +95 -0
  11. package/es/components/FluidNumberInput/index.d.ts +11 -0
  12. package/es/components/FluidSearch/FluidSearch.Skeleton.d.ts +15 -0
  13. package/es/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
  14. package/es/components/FluidSearch/FluidSearch.d.ts +73 -0
  15. package/es/components/FluidSearch/FluidSearch.js +1 -2
  16. package/es/components/FluidSearch/index.d.ts +11 -0
  17. package/es/components/FluidSelect/FluidSelect.Skeleton.d.ts +15 -0
  18. package/es/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
  19. package/es/components/FluidSelect/FluidSelect.d.ts +57 -0
  20. package/es/components/FluidSelect/FluidSelect.js +1 -2
  21. package/es/components/FluidSelect/index.d.ts +13 -0
  22. package/es/components/FluidSelect/index.js +1 -0
  23. package/es/components/FluidTextInput/FluidPasswordInput.d.ts +83 -0
  24. package/es/components/FluidTextInput/FluidPasswordInput.js +87 -0
  25. package/es/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +15 -0
  26. package/es/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
  27. package/es/components/FluidTextInput/FluidTextInput.d.ts +70 -0
  28. package/es/components/FluidTextInput/FluidTextInput.js +6 -4
  29. package/es/components/FluidTextInput/index.d.ts +15 -0
  30. package/es/components/FluidTextInput/index.js +2 -0
  31. package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.d.ts +35 -0
  32. package/es/components/FluidTimePicker/FluidTimePicker.Skeleton.js +4 -2
  33. package/es/components/FluidTimePicker/FluidTimePicker.d.ts +45 -0
  34. package/es/components/FluidTimePicker/FluidTimePicker.js +5 -5
  35. package/es/components/FluidTimePicker/index.d.ts +13 -0
  36. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +41 -0
  37. package/es/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
  38. package/es/components/FluidTimePickerSelect/index.d.ts +11 -0
  39. package/es/components/MultiSelect/FilterableMultiSelect.js +4 -4
  40. package/es/components/MultiSelect/MultiSelect.js +1 -1
  41. package/es/components/Notification/Notification.js +4 -2
  42. package/es/components/OverflowMenuV2/index.js +1 -3
  43. package/es/components/Pagination/Pagination.js +1 -1
  44. package/es/components/Popover/index.js +1 -1
  45. package/es/components/Tabs/Tabs.js +1 -1
  46. package/es/components/UIShell/HeaderPanel.js +1 -1
  47. package/es/index.js +10 -9
  48. package/es/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +757 -4
  49. package/es/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +76 -0
  50. package/es/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +106 -6
  51. package/lib/components/ComboBox/ComboBox.js +12 -3
  52. package/lib/components/ComboButton/index.js +2 -2
  53. package/lib/components/DataTable/TableExpandHeader.d.ts +2 -2
  54. package/lib/components/DataTable/TableExpandHeader.js +1 -1
  55. package/lib/components/DatePicker/DatePicker.js +1 -0
  56. package/lib/components/Dropdown/Dropdown.js +2 -2
  57. package/lib/components/FeatureFlags/index.js +27 -7
  58. package/lib/components/FluidNumberInput/FluidNumberInput.Skeleton.d.ts +15 -0
  59. package/lib/components/FluidNumberInput/FluidNumberInput.d.ts +95 -0
  60. package/lib/components/FluidNumberInput/index.d.ts +11 -0
  61. package/lib/components/FluidSearch/FluidSearch.Skeleton.d.ts +15 -0
  62. package/lib/components/FluidSearch/FluidSearch.Skeleton.js +2 -2
  63. package/lib/components/FluidSearch/FluidSearch.d.ts +73 -0
  64. package/lib/components/FluidSearch/FluidSearch.js +1 -2
  65. package/lib/components/FluidSearch/index.d.ts +11 -0
  66. package/lib/components/FluidSelect/FluidSelect.Skeleton.d.ts +15 -0
  67. package/lib/components/FluidSelect/FluidSelect.Skeleton.js +1 -2
  68. package/lib/components/FluidSelect/FluidSelect.d.ts +57 -0
  69. package/lib/components/FluidSelect/FluidSelect.js +1 -2
  70. package/lib/components/FluidSelect/index.d.ts +13 -0
  71. package/lib/components/FluidSelect/index.js +2 -0
  72. package/lib/components/FluidTextInput/FluidPasswordInput.d.ts +83 -0
  73. package/lib/components/FluidTextInput/FluidPasswordInput.js +93 -0
  74. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.d.ts +15 -0
  75. package/lib/components/FluidTextInput/FluidTextInput.Skeleton.js +2 -2
  76. package/lib/components/FluidTextInput/FluidTextInput.d.ts +70 -0
  77. package/lib/components/FluidTextInput/FluidTextInput.js +6 -4
  78. package/lib/components/FluidTextInput/index.d.ts +15 -0
  79. package/lib/components/FluidTextInput/index.js +3 -0
  80. package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.d.ts +35 -0
  81. package/lib/components/FluidTimePicker/FluidTimePicker.Skeleton.js +4 -2
  82. package/lib/components/FluidTimePicker/FluidTimePicker.d.ts +45 -0
  83. package/lib/components/FluidTimePicker/FluidTimePicker.js +6 -6
  84. package/lib/components/FluidTimePicker/index.d.ts +13 -0
  85. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.d.ts +41 -0
  86. package/lib/components/FluidTimePickerSelect/FluidTimePickerSelect.js +2 -2
  87. package/lib/components/FluidTimePickerSelect/index.d.ts +11 -0
  88. package/lib/components/MultiSelect/FilterableMultiSelect.js +5 -5
  89. package/lib/components/MultiSelect/MultiSelect.js +2 -2
  90. package/lib/components/Notification/Notification.js +4 -2
  91. package/lib/components/OverflowMenuV2/index.js +1 -3
  92. package/lib/components/Pagination/Pagination.js +1 -1
  93. package/lib/components/Popover/index.js +2 -2
  94. package/lib/components/Tabs/Tabs.js +1 -1
  95. package/lib/components/UIShell/HeaderPanel.js +1 -1
  96. package/lib/index.js +19 -18
  97. package/lib/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js +763 -2
  98. package/lib/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js +80 -0
  99. package/lib/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs.js +121 -5
  100. package/package.json +8 -8
@@ -44,6 +44,5 @@ FluidSelectSkeleton.propTypes = {
44
44
  */
45
45
  className: PropTypes__default["default"].string
46
46
  };
47
- var FluidSelectSkeleton$1 = FluidSelectSkeleton;
48
47
 
49
- exports["default"] = FluidSelectSkeleton$1;
48
+ exports["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;
@@ -89,6 +89,5 @@ FluidSelect.propTypes = {
89
89
  */
90
90
  warnText: PropTypes__default["default"].node
91
91
  };
92
- var FluidSelect$1 = FluidSelect;
93
92
 
94
- exports["default"] = FluidSelect$1;
93
+ exports["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,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;
@@ -13,6 +13,7 @@ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelper
13
13
  var React = require('react');
14
14
  var PropTypes = require('prop-types');
15
15
  var FluidSelect = require('../FluidSelect/FluidSelect.js');
16
+ require('../FluidSelect/FluidSelect.Skeleton.js');
16
17
 
17
18
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
18
19
 
@@ -62,6 +63,5 @@ FluidTimePickerSelect.propTypes = {
62
63
  */
63
64
  onChange: PropTypes__default["default"].func
64
65
  };
65
- var FluidTimePickerSelect$1 = FluidTimePickerSelect;
66
66
 
67
- exports["default"] = FluidTimePickerSelect$1;
67
+ exports["default"] = FluidTimePickerSelect;
@@ -0,0 +1,11 @@
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 FluidTimePickerSelect from './FluidTimePickerSelect';
8
+ import { type FluidTimePickerSelectProps } from './FluidTimePickerSelect';
9
+ export { type FluidTimePickerSelectProps };
10
+ export default FluidTimePickerSelect;
11
+ export { FluidTimePickerSelect };