@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
@@ -22,7 +22,7 @@ import { usePrefix } from '../../internal/usePrefix.js';
22
22
  import '../FluidForm/FluidForm.js';
23
23
  import { FormContext } from '../FluidForm/FormContext.js';
24
24
  import { useFloating, flip, autoUpdate } from '@floating-ui/react';
25
- import { hide } from '../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js';
25
+ import { hide } from '../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js';
26
26
  import { Text } from '../Text/Text.js';
27
27
  import { match } from '../../internal/keyboard/match.js';
28
28
  import { ListBoxSize } from '../ListBox/ListBoxPropTypes.js';
@@ -36,7 +36,8 @@ const {
36
36
  ItemMouseMove,
37
37
  InputKeyDownArrowUp,
38
38
  InputKeyDownArrowDown,
39
- MenuMouseLeave
39
+ MenuMouseLeave,
40
+ FunctionSelectItem
40
41
  } = useCombobox.stateChangeTypes;
41
42
  const defaultItemToString = item => {
42
43
  if (typeof item === 'string') {
@@ -239,6 +240,14 @@ const ComboBox = /*#__PURE__*/forwardRef((props, ref) => {
239
240
  }
240
241
  return changes;
241
242
  }
243
+ case FunctionSelectItem:
244
+ if (onChange) {
245
+ onChange({
246
+ selectedItem: changes.selectedItem,
247
+ inputValue: changes.inputValue
248
+ });
249
+ }
250
+ return changes;
242
251
  case InputKeyDownEnter:
243
252
  if (allowCustomValue) {
244
253
  setInputValue(inputValue);
@@ -19,8 +19,8 @@ import { useAttachedMenu } from '../../internal/useAttachedMenu.js';
19
19
  import { useId } from '../../internal/useId.js';
20
20
  import { usePrefix } from '../../internal/usePrefix.js';
21
21
  import { flip, size, useFloating, autoUpdate } from '@floating-ui/react';
22
+ import { hide } from '../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js';
22
23
  import mergeRefs from '../../tools/mergeRefs.js';
23
- import { hide } from '../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js';
24
24
 
25
25
  var _ChevronDown;
26
26
  const defaultTranslations = {
@@ -22,7 +22,7 @@ type TableExpandHeaderPropsBase = {
22
22
  * Specify the string read by a voice reader when the expand trigger is
23
23
  * focused
24
24
  */
25
- ['aria-label']: string;
25
+ ['aria-label']?: string;
26
26
  /**
27
27
  * @deprecated The enableExpando prop is being replaced by `enableToggle`
28
28
  */
@@ -79,7 +79,7 @@ declare const TableExpandHeader: {
79
79
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
80
80
  className: PropTypes.Requireable<string>;
81
81
  /**
82
- * The enableExpando prop is being replaced by enableToggle
82
+ * The enableExpando prop is being replaced by TableExpandHeader
83
83
  */
84
84
  enableExpando: (props: any, propName: any, componentName: any, ...rest: any[]) => any;
85
85
  /**
@@ -69,7 +69,7 @@ TableExpandHeader.propTypes = {
69
69
  children: PropTypes.node,
70
70
  className: PropTypes.string,
71
71
  /**
72
- * The enableExpando prop is being replaced by enableToggle
72
+ * The enableExpando prop is being replaced by TableExpandHeader
73
73
  */
74
74
  enableExpando: deprecate(PropTypes.bool, 'The `enableExpando` prop has been deprecated in favor of `enableToggle`. This prop will be removed in the next major release.'),
75
75
  /**
@@ -554,6 +554,7 @@ const DatePicker = /*#__PURE__*/React__default.forwardRef(function DatePicker(_r
554
554
  if (!calendarRef.current || !startInputField.current) return;
555
555
  const handleKeyDown = event => {
556
556
  if (match(event, Tab) && !event.shiftKey && document.activeElement === endInputField.current && calendarRef.current.isOpen) {
557
+ event.preventDefault();
557
558
  calendarRef.current.close();
558
559
  // Remove focus from endDate calendar input
559
560
  document.activeElement instanceof HTMLElement &&
@@ -19,7 +19,7 @@ import '../FluidForm/FluidForm.js';
19
19
  import { FormContext } from '../FluidForm/FormContext.js';
20
20
  import { useId } from '../../internal/useId.js';
21
21
  import { useFloating, size, flip, autoUpdate } from '@floating-ui/react';
22
- import { hide } from '../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs.js';
22
+ import { hide } from '../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.js';
23
23
  import { ListBoxSize, ListBoxType } from '../ListBox/ListBoxPropTypes.js';
24
24
 
25
25
  const {
@@ -8,6 +8,7 @@
8
8
  import { FeatureFlags as FeatureFlags$1, createScope } from '@carbon/feature-flags';
9
9
  import PropTypes from 'prop-types';
10
10
  import React__default, { createContext, useContext, useState, useRef, useEffect } from 'react';
11
+ import deprecate from '../../prop-types/deprecate.js';
11
12
 
12
13
  /**
13
14
  * Our FeatureFlagContext is used alongside the FeatureFlags component to enable
@@ -23,17 +24,30 @@ const FeatureFlagContext = /*#__PURE__*/createContext(FeatureFlags$1);
23
24
  function FeatureFlags(_ref) {
24
25
  let {
25
26
  children,
26
- flags = {}
27
+ flags = {},
28
+ enableV12TileDefaultIcons = false,
29
+ enableV12TileRadioIcons = false,
30
+ enableV12Overflowmenu = false,
31
+ enableTreeviewControllable = false,
32
+ enableExperimentalFocusWrapWithoutSentinels = false
27
33
  } = _ref;
28
34
  const parentScope = useContext(FeatureFlagContext);
29
35
  const [prevParentScope, setPrevParentScope] = useState(parentScope);
36
+ const combinedFlags = {
37
+ 'enable-v12-tile-default-icons': enableV12TileDefaultIcons,
38
+ 'enable-v12-tile-radio-icons': enableV12TileRadioIcons,
39
+ 'enable-v12-overflowmenu': enableV12Overflowmenu,
40
+ 'enable-treeview-controllable': enableTreeviewControllable,
41
+ 'enable-experimental-focus-wrap-without-sentinels': enableExperimentalFocusWrapWithoutSentinels,
42
+ ...flags
43
+ };
30
44
  const [scope, updateScope] = useState(() => {
31
- const scope = createScope(flags);
45
+ const scope = createScope(combinedFlags);
32
46
  scope.mergeWithScope(parentScope);
33
47
  return scope;
34
48
  });
35
49
  if (parentScope !== prevParentScope) {
36
- const scope = createScope(flags);
50
+ const scope = createScope(combinedFlags);
37
51
  scope.mergeWithScope(parentScope);
38
52
  updateScope(scope);
39
53
  setPrevParentScope(parentScope);
@@ -42,7 +56,7 @@ function FeatureFlags(_ref) {
42
56
  // We use a custom hook to detect if any of the keys or their values change
43
57
  // for flags that are passed in. If they have changed, then we re-create the
44
58
  // FeatureFlagScope using the new flags
45
- useChangedValue(flags, isEqual, changedFlags => {
59
+ useChangedValue(combinedFlags, isEqual, changedFlags => {
46
60
  const scope = createScope(changedFlags);
47
61
  scope.mergeWithScope(parentScope);
48
62
  updateScope(scope);
@@ -54,9 +68,14 @@ function FeatureFlags(_ref) {
54
68
  FeatureFlags.propTypes = {
55
69
  children: PropTypes.node,
56
70
  /**
57
- * Provide the feature flags to enabled or disabled in the current React tree
71
+ * Provide the feature flags to enabled or disabled in the current Rea,ct tree
58
72
  */
59
- flags: PropTypes.objectOf(PropTypes.bool)
73
+ flags: deprecate(PropTypes.objectOf(PropTypes.bool), 'The `flags` prop for `FeatureFlag` has ' + 'been deprecated. Please run the `featureflag-deprecate-flags-prop` codemod to migrate to individual boolean props.' + `npx @carbon/upgrade migrate featureflag-deprecate-flags-prop --write`),
74
+ enableV12TileDefaultIcons: PropTypes.bool,
75
+ enableV12TileRadioIcons: PropTypes.bool,
76
+ enableV12Overflowmenu: PropTypes.bool,
77
+ enableTreeviewControllable: PropTypes.bool,
78
+ enableExperimentalFocusWrapWithoutSentinels: PropTypes.bool
60
79
  };
61
80
 
62
81
  /**
@@ -98,7 +117,8 @@ function useChangedValue(value, compare, callback) {
98
117
  */
99
118
  function useFeatureFlag(flag) {
100
119
  const scope = useContext(FeatureFlagContext);
101
- return scope.enabled(flag);
120
+ //updated to return false for undefined flags
121
+ return scope.enabled(flag) ?? false;
102
122
  }
103
123
 
104
124
  /**
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ export interface FluidNumberInputSkeletonProps {
9
+ /**
10
+ * Specify an optional className to be applied to the outer FluidForm wrapper
11
+ */
12
+ className?: string;
13
+ }
14
+ declare const FluidNumberInputSkeleton: React.FC<FluidNumberInputSkeletonProps>;
15
+ export default FluidNumberInputSkeleton;
@@ -0,0 +1,95 @@
1
+ /**
2
+ * Copyright IBM Corp. 2022
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ export interface FluidNumberInputProps {
9
+ /**
10
+ * `true` to allow empty string.
11
+ */
12
+ allowEmpty?: boolean;
13
+ /**
14
+ * Specify an optional className to be applied to the wrapper node
15
+ */
16
+ className?: string;
17
+ /**
18
+ * Optional starting value for uncontrolled state
19
+ */
20
+ defaultValue?: number | string;
21
+ /**
22
+ * Specify if the wheel functionality for the input should be disabled, or not
23
+ */
24
+ disableWheel?: boolean;
25
+ /**
26
+ * Specify if the control should be disabled, or not
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * Provide a description for up/down icons that can be read by screen readers
31
+ */
32
+ iconDescription?: string;
33
+ /**
34
+ * Specify a custom `id` for the input
35
+ */
36
+ id: string;
37
+ /**
38
+ * Specify if the currently value is invalid.
39
+ */
40
+ invalid?: boolean;
41
+ /**
42
+ * Message which is displayed if the value is invalid.
43
+ */
44
+ invalidText?: React.ReactNode;
45
+ /**
46
+ * Generic `label` that will be used as the textual representation of what
47
+ * this field is for
48
+ */
49
+ label?: React.ReactNode;
50
+ /**
51
+ * The maximum value.
52
+ */
53
+ max?: number;
54
+ /**
55
+ * The minimum value.
56
+ */
57
+ min?: number;
58
+ onChange?: (event: React.MouseEvent<HTMLButtonElement>, state: {
59
+ value: number | string;
60
+ direction: string;
61
+ }) => void;
62
+ /**
63
+ * Provide an optional function to be called when the up/down button is clicked
64
+ */
65
+ onClick?: (event: React.MouseEvent<HTMLElement>, state?: {
66
+ value: number | string;
67
+ direction: string;
68
+ }) => void;
69
+ /**
70
+ * Provide an optional function to be called when a key is pressed in the number input
71
+ */
72
+ onKeyUp?: React.KeyboardEventHandler<HTMLInputElement>;
73
+ /**
74
+ * Specify how much the values should increase/decrease upon clicking on up/down button
75
+ */
76
+ step?: number;
77
+ /**
78
+ * Provide custom text for the component for each translation id
79
+ */
80
+ translateWithId?: (id: string) => string;
81
+ /**
82
+ * Specify the value of the input
83
+ */
84
+ value?: number | string;
85
+ /**
86
+ * Specify whether the control is currently in warning state
87
+ */
88
+ warn?: boolean;
89
+ /**
90
+ * Provide the text that is displayed when the control is in warning state
91
+ */
92
+ warnText?: React.ReactNode;
93
+ }
94
+ declare const FluidNumberInput: React.FC<FluidNumberInputProps>;
95
+ export default FluidNumberInput;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import { FluidNumberInputProps } from './FluidNumberInput';
8
+ import { FluidNumberInputSkeletonProps } from './FluidNumberInput.Skeleton';
9
+ export { type FluidNumberInputProps, type FluidNumberInputSkeletonProps };
10
+ export { default, default as FluidNumberInput } from './FluidNumberInput';
11
+ export { default as FluidNumberInputSkeleton } from './FluidNumberInput.Skeleton';
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright IBM Corp. 2016, 2023
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+ import React from 'react';
8
+ export interface FluidSearchSkeletonProps {
9
+ /**
10
+ * Specify an optional className to be applied to the outer FluidForm wrapper
11
+ */
12
+ className?: string;
13
+ }
14
+ declare const FluidSearchSkeleton: React.FC<FluidSearchSkeletonProps>;
15
+ export default FluidSearchSkeleton;
@@ -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
- function FluidSearchSkeleton(_ref) {
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;
@@ -91,6 +91,5 @@ FluidSearch.propTypes = {
91
91
  */
92
92
  value: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
93
93
  };
94
- var FluidSearch$1 = FluidSearch;
95
94
 
96
- export { FluidSearch$1 as default };
95
+ export { FluidSearch as default };
@@ -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;
@@ -34,6 +34,5 @@ FluidSelectSkeleton.propTypes = {
34
34
  */
35
35
  className: PropTypes.string
36
36
  };
37
- var FluidSelectSkeleton$1 = FluidSelectSkeleton;
38
37
 
39
- export { FluidSelectSkeleton$1 as default };
38
+ export { FluidSelectSkeleton as default };
@@ -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;
@@ -79,6 +79,5 @@ FluidSelect.propTypes = {
79
79
  */
80
80
  warnText: PropTypes.node
81
81
  };
82
- var FluidSelect$1 = FluidSelect;
83
82
 
84
- export { FluidSelect$1 as default };
83
+ export { FluidSelect as default };
@@ -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';
@@ -7,3 +7,4 @@
7
7
 
8
8
  import FluidSelect from './FluidSelect.js';
9
9
  export { default as FluidSelect, default } from './FluidSelect.js';
10
+ export { default as FluidSelectSkeleton } from './FluidSelect.Skeleton.js';
@@ -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;