@mezzanine-ui/react 0.9.2 → 0.10.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 (171) hide show
  1. package/Accordion/Accordion.js +5 -4
  2. package/Accordion/AccordionDetails.js +2 -2
  3. package/Accordion/AccordionSummary.js +3 -4
  4. package/Alert/Alert.js +1 -3
  5. package/AppBar/AppBar.js +1 -1
  6. package/AppBar/AppBarBrand.d.ts +1 -1
  7. package/AppBar/AppBarBrand.js +1 -1
  8. package/AppBar/AppBarMain.d.ts +1 -1
  9. package/AppBar/AppBarMain.js +1 -1
  10. package/AppBar/AppBarSupport.d.ts +1 -1
  11. package/AppBar/AppBarSupport.js +1 -1
  12. package/Badge/Badge.js +2 -2
  13. package/Badge/BadgeContainer.d.ts +1 -1
  14. package/Badge/BadgeContainer.js +1 -1
  15. package/Button/Button.d.ts +2 -2
  16. package/Button/Button.js +3 -3
  17. package/Button/ButtonGroup.js +3 -3
  18. package/Button/IconButton.d.ts +3 -3
  19. package/Button/IconButton.js +1 -1
  20. package/Calendar/Calendar.js +9 -10
  21. package/Calendar/CalendarCell.js +2 -2
  22. package/Calendar/CalendarContext.d.ts +3 -3
  23. package/Calendar/CalendarContext.js +20 -12
  24. package/Calendar/CalendarControls.js +3 -3
  25. package/Calendar/CalendarDayOfWeek.js +1 -1
  26. package/Calendar/CalendarDays.js +4 -5
  27. package/Calendar/CalendarMonths.js +4 -4
  28. package/Calendar/CalendarWeeks.js +4 -5
  29. package/Calendar/CalendarYears.js +4 -4
  30. package/Calendar/useCalendarControls.d.ts +2 -3
  31. package/Card/Card.js +5 -5
  32. package/Card/CardActions.js +1 -2
  33. package/Checkbox/CheckAll.js +2 -2
  34. package/Checkbox/Checkbox.js +2 -2
  35. package/Checkbox/CheckboxGroup.js +2 -2
  36. package/ConfirmActions/ConfirmActions.js +1 -2
  37. package/DatePicker/DatePicker.js +2 -3
  38. package/DatePicker/DatePickerCalendar.js +1 -1
  39. package/DateRangePicker/DateRangePicker.js +2 -3
  40. package/DateRangePicker/DateRangePickerCalendar.js +3 -4
  41. package/DateRangePicker/useDateRangeCalendarControls.d.ts +1 -2
  42. package/DateRangePicker/useDateRangePickerValue.d.ts +12 -13
  43. package/DateTimePicker/DateTimePicker.js +2 -3
  44. package/DateTimePicker/DateTimePickerPanel.js +1 -3
  45. package/Drawer/Drawer.js +1 -1
  46. package/Dropdown/Dropdown.js +2 -2
  47. package/Empty/Empty.js +3 -4
  48. package/Form/FormField.js +2 -2
  49. package/Form/FormLabel.js +1 -2
  50. package/Form/FormMessage.d.ts +1 -1
  51. package/Form/FormMessage.js +1 -1
  52. package/Form/useAutoCompleteValueControl.d.ts +30 -11
  53. package/Form/useAutoCompleteValueControl.js +71 -31
  54. package/Form/useInputWithTagsModeValue.js +2 -1
  55. package/Form/useSelectValueControl.d.ts +1 -1
  56. package/Icon/Icon.js +2 -2
  57. package/Input/Input.js +2 -3
  58. package/Loading/Loading.js +4 -5
  59. package/Menu/Menu.js +1 -1
  60. package/Menu/MenuDivider.d.ts +1 -1
  61. package/Menu/MenuDivider.js +1 -1
  62. package/Menu/MenuItem.js +2 -3
  63. package/Menu/MenuItemGroup.js +1 -2
  64. package/Message/Message.js +2 -3
  65. package/Modal/Modal.js +2 -2
  66. package/Modal/ModalActions.js +1 -1
  67. package/Modal/ModalBody.d.ts +1 -1
  68. package/Modal/ModalBody.js +1 -1
  69. package/Modal/ModalFooter.d.ts +1 -1
  70. package/Modal/ModalFooter.js +1 -1
  71. package/Modal/ModalHeader.js +2 -3
  72. package/Modal/useModalContainer.js +1 -1
  73. package/Navigation/Navigation.js +2 -2
  74. package/Navigation/NavigationItem.js +1 -1
  75. package/Navigation/NavigationSubMenu.js +3 -5
  76. package/Notification/Notification.js +2 -7
  77. package/Notifier/NotifierManager.js +1 -1
  78. package/Notifier/createNotifier.js +1 -1
  79. package/Overlay/Overlay.js +3 -3
  80. package/PageFooter/PageFooter.js +1 -2
  81. package/Pagination/Pagination.js +2 -3
  82. package/Pagination/PaginationItem.js +4 -4
  83. package/Pagination/PaginationJumper.js +2 -4
  84. package/Picker/PickerTrigger.js +1 -1
  85. package/Picker/RangePickerTrigger.js +1 -3
  86. package/Picker/usePickerInputValue.d.ts +2 -2
  87. package/Picker/usePickerValue.d.ts +6 -7
  88. package/Picker/useRangePickerValue.d.ts +9 -10
  89. package/Popconfirm/Popconfirm.js +1 -1
  90. package/Popover/Popover.js +2 -3
  91. package/Popper/Popper.js +2 -2
  92. package/Portal/Portal.js +1 -1
  93. package/Progress/Progress.js +5 -7
  94. package/Radio/Radio.js +2 -2
  95. package/Radio/RadioGroup.js +2 -2
  96. package/Select/AutoComplete.d.ts +40 -13
  97. package/Select/AutoComplete.js +37 -28
  98. package/Select/Option.js +2 -2
  99. package/Select/Select.d.ts +2 -50
  100. package/Select/Select.js +15 -49
  101. package/Select/SelectTrigger.d.ts +8 -1
  102. package/Select/SelectTrigger.js +8 -12
  103. package/Select/SelectTriggerTags.d.ts +19 -0
  104. package/Select/SelectTriggerTags.js +33 -0
  105. package/Select/TreeSelect.js +2 -3
  106. package/Select/index.d.ts +1 -0
  107. package/Select/index.js +1 -0
  108. package/Select/useSelectTriggerTags.d.ts +19 -0
  109. package/Select/useSelectTriggerTags.js +61 -0
  110. package/Skeleton/Skeleton.js +1 -1
  111. package/Slider/Slider.d.ts +1 -1
  112. package/Slider/Slider.js +7 -11
  113. package/Stepper/Step.js +2 -2
  114. package/Stepper/Stepper.js +1 -1
  115. package/Switch/Switch.js +2 -3
  116. package/Table/Table.d.ts +1 -1
  117. package/Table/Table.js +3 -10
  118. package/Table/TableBody.js +2 -4
  119. package/Table/TableBodyRow.js +4 -7
  120. package/Table/TableCell.js +3 -3
  121. package/Table/TableExpandedTable.js +5 -6
  122. package/Table/TableHeader.d.ts +2 -1
  123. package/Table/TableHeader.js +3 -6
  124. package/Table/editable/TableEditRenderWrapper.js +2 -2
  125. package/Table/expandable/TableExpandable.js +2 -2
  126. package/Table/pagination/TablePagination.js +1 -2
  127. package/Table/refresh/TableRefresh.js +1 -1
  128. package/Table/rowSelection/TableRowSelection.js +5 -6
  129. package/Table/sorting/TableSortingIcon.js +2 -2
  130. package/Table/sorting/useTableSorting.d.ts +2 -2
  131. package/Table/useTableScroll.d.ts +178 -178
  132. package/Tabs/Tab.js +2 -2
  133. package/Tabs/TabPane.js +1 -1
  134. package/Tabs/Tabs.js +1 -3
  135. package/Tag/Tag.js +3 -4
  136. package/TextField/TextField.js +3 -3
  137. package/TextField/useTextFieldControl.d.ts +2 -2
  138. package/Textarea/Textarea.js +2 -3
  139. package/TimePanel/TimePanel.js +1 -4
  140. package/TimePanel/TimePanelAction.js +1 -1
  141. package/TimePanel/TimePanelColumn.js +2 -5
  142. package/TimePicker/TimePicker.js +2 -3
  143. package/TimePicker/TimePickerPanel.js +1 -1
  144. package/Tooltip/Tooltip.js +3 -3
  145. package/Transition/Collapse.js +3 -2
  146. package/Transition/Fade.js +2 -2
  147. package/Transition/Grow.js +3 -2
  148. package/Transition/SlideFade.js +2 -2
  149. package/Transition/Transition.js +2 -2
  150. package/Transition/Zoom.js +2 -2
  151. package/Tree/Tree.js +1 -1
  152. package/Tree/TreeNode.js +5 -7
  153. package/Tree/TreeNodeList.js +5 -4
  154. package/Tree/getTreeNodeEntities.js +6 -3
  155. package/Typography/Typography.d.ts +2 -2
  156. package/Typography/Typography.js +2 -2
  157. package/Upload/UploadButton.js +2 -2
  158. package/Upload/UploadInput.js +1 -1
  159. package/Upload/UploadPicture.js +1 -1
  160. package/Upload/UploadPictureBlock.js +2 -8
  161. package/Upload/UploadPictureWall.d.ts +1 -1
  162. package/Upload/UploadPictureWall.js +1 -2
  163. package/Upload/UploadPictureWallItem.js +1 -1
  164. package/Upload/UploadResult.js +2 -5
  165. package/_internal/InputCheck/InputCheck.js +2 -3
  166. package/_internal/InputCheck/InputCheckGroup.js +1 -1
  167. package/_internal/InputTriggerPopper/InputTriggerPopper.js +2 -2
  168. package/_internal/SlideFadeOverlay/SlideFadeOverlay.js +1 -1
  169. package/index.d.ts +1 -1
  170. package/index.js +1 -0
  171. package/package.json +3 -3
@@ -38,15 +38,13 @@ const PaginationJumper = forwardRef((props, ref) => {
38
38
  handleClick();
39
39
  }
40
40
  };
41
- return (jsxs("div", Object.assign({}, rest, { ref: ref, className: cx(paginationJumperClasses.host, className) }, { children: [jsx(Typography, Object.assign({ color: disabled ? 'text-disabled' : 'text-primary', component: "div", ellipsis: true, variant: "input2" }, { children: hintText }), void 0),
42
- jsx(Input, { disabled: disabled, error: error, onChange: (e) => {
41
+ return (jsxs("div", { ...rest, ref: ref, className: cx(paginationJumperClasses.host, className), children: [jsx(Typography, { color: disabled ? 'text-disabled' : 'text-primary', component: "div", ellipsis: true, variant: "input2", children: hintText }), jsx(Input, { disabled: disabled, error: error, onChange: (e) => {
43
42
  setValue(e.target.value);
44
43
  }, placeholder: inputPlaceholder, inputProps: {
45
44
  type: 'number',
46
45
  className: paginationJumperClasses.input,
47
46
  onKeyDown: handleKeyDown,
48
- }, value: value }, void 0),
49
- jsx(Button, Object.assign({ disabled: disabled, onClick: handleClick }, { children: buttonText }), void 0)] }), void 0));
47
+ }, value: value }), jsx(Button, { disabled: disabled, onClick: handleClick, children: buttonText })] }));
50
48
  });
51
49
  var PaginationJumper$1 = PaginationJumper;
52
50
 
@@ -9,7 +9,7 @@ import cx from 'clsx';
9
9
  */
10
10
  const PickerTrigger = forwardRef(function PickerTrigger(props, ref) {
11
11
  const { className, disabled, inputProps, inputRef, onChange, placeholder, readOnly, required, value, ...restTextFieldProps } = props;
12
- return (jsx(TextField, Object.assign({}, restTextFieldProps, { ref: ref, active: !!value, className: cx(pickerClasses.host, className), disabled: disabled }, { children: jsx("input", Object.assign({}, inputProps, { ref: inputRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onChange, placeholder: placeholder, readOnly: readOnly, required: required, value: value }), void 0) }), void 0));
12
+ return (jsx(TextField, { ...restTextFieldProps, ref: ref, active: !!value, className: cx(pickerClasses.host, className), disabled: disabled, children: jsx("input", { ...inputProps, ref: inputRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onChange, placeholder: placeholder, readOnly: readOnly, required: required, value: value }) }));
13
13
  });
14
14
  var PickerTrigger$1 = PickerTrigger;
15
15
 
@@ -11,9 +11,7 @@ import cx from 'clsx';
11
11
  */
12
12
  const RangePickerTrigger = forwardRef(function DateRangePickerTrigger(props, ref) {
13
13
  const { className, disabled, inputFromPlaceholder, inputFromProps, inputFromRef, inputFromValue, inputToPlaceholder, inputToProps, inputToRef, inputToValue, onIconClick, onInputFromChange, onInputToChange, readOnly, required, ...restTextFieldProps } = props;
14
- return (jsxs(TextField, Object.assign({}, restTextFieldProps, { ref: ref, active: !!inputFromValue || !!inputToValue, className: cx(pickerClasses.host, className), disabled: disabled }, { children: [jsx("input", Object.assign({}, inputFromProps, { ref: inputFromRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onInputFromChange, placeholder: inputFromPlaceholder, readOnly: readOnly, required: required, value: inputFromValue }), void 0),
15
- jsx(Icon, { icon: ArrowRightIcon, className: pickerClasses.arrowIcon }, void 0),
16
- jsx("input", Object.assign({}, inputToProps, { ref: inputToRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onInputToChange, placeholder: inputToPlaceholder, readOnly: readOnly, required: required, value: inputToValue }), void 0)] }), void 0));
14
+ return (jsxs(TextField, { ...restTextFieldProps, ref: ref, active: !!inputFromValue || !!inputToValue, className: cx(pickerClasses.host, className), disabled: disabled, children: [jsx("input", { ...inputFromProps, ref: inputFromRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onInputFromChange, placeholder: inputFromPlaceholder, readOnly: readOnly, required: required, value: inputFromValue }), jsx(Icon, { icon: ArrowRightIcon, className: pickerClasses.arrowIcon }), jsx("input", { ...inputToProps, ref: inputToRef, "aria-disabled": disabled, "aria-multiline": false, "aria-readonly": readOnly, "aria-required": required, disabled: disabled, onChange: onInputToChange, placeholder: inputToPlaceholder, readOnly: readOnly, required: required, value: inputToValue })] }));
17
15
  });
18
16
  var RangePickerTrigger$1 = RangePickerTrigger;
19
17
 
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import { ChangeEventHandler } from 'react';
2
2
  export interface UsePickerInputValueProps {
3
3
  defaultValue?: string;
4
4
  initialValue?: string;
@@ -6,7 +6,7 @@ export interface UsePickerInputValueProps {
6
6
  }
7
7
  export declare function usePickerInputValue(props?: UsePickerInputValueProps): {
8
8
  inputValue: string;
9
- inputChangeHandler: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
9
+ inputChangeHandler: ChangeEventHandler<HTMLInputElement>;
10
10
  onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
11
11
  };
12
12
  export default usePickerInputValue;
@@ -1,6 +1,5 @@
1
- /// <reference types="moment" />
2
1
  import { DateType } from '@mezzanine-ui/core/calendar';
3
- import { RefObject } from 'react';
2
+ import { FocusEventHandler, KeyboardEventHandler, RefObject } from 'react';
4
3
  export declare type UsePickerValueProps = {
5
4
  defaultValue?: DateType;
6
5
  format: string;
@@ -13,9 +12,9 @@ export declare type UsePickerValueProps = {
13
12
  */
14
13
  export declare function usePickerValue({ defaultValue, format, formats, inputRef, value: valueProp, }: UsePickerValueProps): {
15
14
  inputValue: string;
16
- onBlur: (event: import("react").FocusEvent<HTMLInputElement, Element>) => void;
17
- onChange: (val?: import("moment").Moment | undefined) => void;
18
- onInputChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
19
- onKeyDown: (event: import("react").KeyboardEvent<HTMLInputElement>) => void;
20
- value: import("moment").Moment | undefined;
15
+ onBlur: FocusEventHandler<HTMLInputElement>;
16
+ onChange: (val?: string | undefined) => void;
17
+ onInputChange: import("react").ChangeEventHandler<HTMLInputElement>;
18
+ onKeyDown: KeyboardEventHandler<HTMLInputElement>;
19
+ value: string | undefined;
21
20
  };
@@ -1,6 +1,5 @@
1
- /// <reference types="moment" />
2
1
  import { RangePickerPickingValue, RangePickerValue } from '@mezzanine-ui/core/picker';
3
- import { RefObject } from 'react';
2
+ import { ChangeEventHandler, KeyboardEventHandler, RefObject } from 'react';
4
3
  import { UsePickerValueProps } from './usePickerValue';
5
4
  export interface UseRangePickerValueProps extends Pick<UsePickerValueProps, 'format' | 'formats'> {
6
5
  inputFromRef: RefObject<HTMLInputElement>;
@@ -10,12 +9,12 @@ export interface UseRangePickerValueProps extends Pick<UsePickerValueProps, 'for
10
9
  export declare function useRangePickerValue({ format, formats, inputFromRef, inputToRef, value: valueProp, }: UseRangePickerValueProps): {
11
10
  inputFromValue: string;
12
11
  inputToValue: string;
13
- onChange: (target?: undefined[] | [import("moment").Moment, import("moment").Moment] | [import("moment").Moment] | [undefined, import("moment").Moment] | [import("moment").Moment, undefined] | undefined) => RangePickerPickingValue | undefined;
14
- onFromBlur: (event: import("react").FocusEvent<HTMLInputElement, Element>) => void;
15
- onFromKeyDown: (event: import("react").KeyboardEvent<HTMLInputElement>) => void;
16
- onInputFromChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
17
- onInputToChange: (event: import("react").ChangeEvent<HTMLInputElement>) => void;
18
- onToBlur: (event: import("react").FocusEvent<HTMLInputElement, Element>) => void;
19
- onToKeyDown: (event: import("react").KeyboardEvent<HTMLInputElement>) => void;
20
- value: RangePickerPickingValue;
12
+ onChange: (target?: RangePickerPickingValue<string> | undefined) => RangePickerPickingValue | undefined;
13
+ onFromBlur: import("react").FocusEventHandler<HTMLInputElement>;
14
+ onFromKeyDown: KeyboardEventHandler<HTMLInputElement>;
15
+ onInputFromChange: ChangeEventHandler<HTMLInputElement>;
16
+ onInputToChange: ChangeEventHandler<HTMLInputElement>;
17
+ onToBlur: import("react").FocusEventHandler<HTMLInputElement>;
18
+ onToKeyDown: KeyboardEventHandler<HTMLInputElement>;
19
+ value: RangePickerPickingValue<string>;
21
20
  };
@@ -9,7 +9,7 @@ import cx from 'clsx';
9
9
 
10
10
  const Popconfirm = forwardRef(function Popconfirm(props, ref) {
11
11
  const { className, container, cancelButtonProps, cancelText, confirmButtonProps, confirmText, icon = ExclamationCircleFilledIcon, onCancel, onConfirm, title, ...rest } = props;
12
- return (jsx(Popover, Object.assign({}, rest, { ref: ref, className: cx(popConfirmClasses.host, className), title: (jsxs(Fragment, { children: [jsx(Icon, { className: popConfirmClasses.icon, icon: icon }, void 0), title] }, void 0)) }, { children: jsx(ConfirmActions, { cancelButtonProps: cancelButtonProps, cancelText: cancelText, confirmButtonProps: confirmButtonProps, confirmText: confirmText, onCancel: onCancel, onConfirm: onConfirm, size: "small" }, void 0) }), void 0));
12
+ return (jsx(Popover, { ...rest, ref: ref, className: cx(popConfirmClasses.host, className), title: (jsxs(Fragment, { children: [jsx(Icon, { className: popConfirmClasses.icon, icon: icon }), title] })), children: jsx(ConfirmActions, { cancelButtonProps: cancelButtonProps, cancelText: cancelText, confirmButtonProps: confirmButtonProps, confirmText: confirmText, onCancel: onCancel, onConfirm: onConfirm, size: "small" }) }));
13
13
  });
14
14
  var Popconfirm$1 = Popconfirm;
15
15
 
@@ -35,11 +35,10 @@ const Popover = forwardRef(function Popover(props, ref) {
35
35
  onClose,
36
36
  popoverRef,
37
37
  ]);
38
- return (jsxs(Popper, Object.assign({}, rest, { ref: composedRef, className: cx(popoverClasses.host, className), open: open, options: {
38
+ return (jsxs(Popper, { ...rest, ref: composedRef, className: cx(popoverClasses.host, className), open: open, options: {
39
39
  ...options,
40
40
  modifiers: [offsetModifier, ...modifiers],
41
- } }, { children: [title && jsx("div", Object.assign({ className: popoverClasses.title }, { children: title }), void 0),
42
- children && jsx("div", Object.assign({ className: popoverClasses.content }, { children: children }), void 0)] }), void 0));
41
+ }, children: [title && jsx("div", { className: popoverClasses.title, children: title }), children && jsx("div", { className: popoverClasses.content, children: children })] }));
43
42
  });
44
43
  var Popover$1 = Popover;
45
44
 
package/Popper/Popper.js CHANGED
@@ -21,10 +21,10 @@ const Popper = forwardRef(function Popper(props, ref) {
21
21
  if (!open) {
22
22
  return null;
23
23
  }
24
- return (jsx(Portal, Object.assign({ container: container, disablePortal: disablePortal }, { children: jsx("div", Object.assign({}, rest, { ref: composedRef, style: {
24
+ return (jsx(Portal, { container: container, disablePortal: disablePortal, children: jsx("div", { ...rest, ref: composedRef, style: {
25
25
  ...style,
26
26
  ...styles.popper,
27
- } }, attributes.popper, { children: children }), void 0) }), void 0));
27
+ }, ...attributes.popper, children: children }) }));
28
28
  });
29
29
  var Popper$1 = Popper;
30
30
 
package/Portal/Portal.js CHANGED
@@ -14,7 +14,7 @@ const Portal = (props) => {
14
14
  }
15
15
  }, [container, disablePortal]);
16
16
  if (disablePortal || !portalElement) {
17
- return jsx(Fragment, { children: children }, void 0);
17
+ return jsx(Fragment, { children: children });
18
18
  }
19
19
  return createPortal(children, portalElement);
20
20
  };
@@ -14,19 +14,17 @@ const Progress = forwardRef(function Progress(props, ref) {
14
14
  const percentLimited = Math.max(0, Math.min(100, percent));
15
15
  const defaultSuccessIcon = type === ProgressTypes.line ? CheckCircleFilledIcon : CheckIcon;
16
16
  const defaultErrorIcon = type === ProgressTypes.line ? TimesCircleFilledIcon : TimesIcon;
17
- const renderInfo = (variant) => (jsx("div", Object.assign({ className: progressClasses.info }, { children: status === ProgressStatuses.normal
18
- ? /** percent text */ (jsx(Typography, Object.assign({ className: progressClasses.infoPercent, variant: variant }, percentProps, { children: `${percentLimited}%` }), void 0)) : (jsxs(Fragment, { children: [status === ProgressStatuses.success && (jsx(Icon, Object.assign({ className: progressClasses.infoIcon, icon: defaultSuccessIcon }, successIconProps), void 0)),
19
- status === ProgressStatuses.error && (jsx(Icon, Object.assign({ className: progressClasses.infoIcon, icon: defaultErrorIcon }, errorIconProps), void 0))] }, void 0)) }), void 0));
20
- const renderLine = () => (jsxs(Fragment, { children: [jsx("div", Object.assign({ className: progressClasses.lineBg }, { children: jsx("div", { style: { width: `${percentLimited}%` } }, void 0) }), void 0), showInfo && renderInfo('input3')] }, void 0));
17
+ const renderInfo = (variant) => (jsx("div", { className: progressClasses.info, children: status === ProgressStatuses.normal
18
+ ? /** percent text */ (jsx(Typography, { className: progressClasses.infoPercent, variant: variant, ...percentProps, children: `${percentLimited}%` })) : (jsxs(Fragment, { children: [status === ProgressStatuses.success && (jsx(Icon, { className: progressClasses.infoIcon, icon: defaultSuccessIcon, ...successIconProps })), status === ProgressStatuses.error && (jsx(Icon, { className: progressClasses.infoIcon, icon: defaultErrorIcon, ...errorIconProps }))] })) }));
19
+ const renderLine = () => (jsxs(Fragment, { children: [jsx("div", { className: progressClasses.lineBg, children: jsx("div", { style: { width: `${percentLimited}%` } }) }), showInfo && renderInfo('input3')] }));
21
20
  const renderCircle = () => {
22
21
  const { size: circleSize = 80, strokeWidth = 8, } = circleProps || {};
23
22
  const radius = (circleSize - strokeWidth) / 2;
24
23
  const progressLength = percent > 0 ? percent * radius * Math.PI * 0.02 : 0.00001;
25
24
  const circleXY = circleSize / 2;
26
- return (jsxs(Fragment, { children: [jsxs("svg", Object.assign({ style: { boxSizing: 'border-box' }, height: circleSize, width: circleSize }, { children: [jsx("circle", { className: progressClasses.circleBg, cx: circleXY, cy: circleXY, r: radius, strokeWidth: strokeWidth }, void 0),
27
- jsx("circle", { className: progressClasses.circleFiller, cx: circleXY, cy: circleXY, r: radius, strokeWidth: strokeWidth, strokeDasharray: `${progressLength.toString()} 999` }, void 0)] }), void 0), showInfo && renderInfo('button3')] }, void 0));
25
+ return (jsxs(Fragment, { children: [jsxs("svg", { style: { boxSizing: 'border-box' }, height: circleSize, width: circleSize, children: [jsx("circle", { className: progressClasses.circleBg, cx: circleXY, cy: circleXY, r: radius, strokeWidth: strokeWidth }), jsx("circle", { className: progressClasses.circleFiller, cx: circleXY, cy: circleXY, r: radius, strokeWidth: strokeWidth, strokeDasharray: `${progressLength.toString()} 999` })] }), showInfo && renderInfo('button3')] }));
28
26
  };
29
- return (jsxs("div", Object.assign({ ref: ref, className: cx(progressClasses.host, className, status === ProgressStatuses.success && progressClasses.success, status === ProgressStatuses.error && progressClasses.error, type === ProgressTypes.line && progressClasses.lineVariant, type === ProgressTypes.circle && progressClasses.circleVariant, progressClasses.size(size)) }, rest, { children: [type === ProgressTypes.line && renderLine(), type === ProgressTypes.circle && renderCircle()] }), void 0));
27
+ return (jsxs("div", { ref: ref, className: cx(progressClasses.host, className, status === ProgressStatuses.success && progressClasses.success, status === ProgressStatuses.error && progressClasses.error, type === ProgressTypes.line && progressClasses.lineVariant, type === ProgressTypes.circle && progressClasses.circleVariant, progressClasses.size(size)), ...rest, children: [type === ProgressTypes.line && renderLine(), type === ProgressTypes.circle && renderCircle()] }));
30
28
  });
31
29
  var Progress$1 = Progress;
32
30
 
package/Radio/Radio.js CHANGED
@@ -23,9 +23,9 @@ const Radio = forwardRef(function Radio(props, ref) {
23
23
  radioGroup,
24
24
  value,
25
25
  });
26
- return (jsx(InputCheck, Object.assign({}, rest, { ref: ref, control: (jsx("span", Object.assign({ className: cx(radioClasses.host, {
26
+ return (jsx(InputCheck, { ...rest, ref: ref, control: (jsx("span", { className: cx(radioClasses.host, {
27
27
  [radioClasses.checked]: checked,
28
- }) }, { children: jsx("input", Object.assign({}, restInputProps, { "aria-checked": checked, "aria-disabled": disabled, checked: checked, disabled: disabled, id: inputId, onChange: onChange, name: name, type: "radio", value: value }), void 0) }), void 0)), disabled: disabled, error: error, htmlFor: inputId, size: size }, { children: children }), void 0));
28
+ }), children: jsx("input", { ...restInputProps, "aria-checked": checked, "aria-disabled": disabled, checked: checked, disabled: disabled, id: inputId, onChange: onChange, name: name, type: "radio", value: value }) })), disabled: disabled, error: error, htmlFor: inputId, size: size, children: children }));
29
29
  });
30
30
  var Radio$1 = Radio;
31
31
 
@@ -22,8 +22,8 @@ const RadioGroup = forwardRef(function RadioGroup(props, ref) {
22
22
  size,
23
23
  value,
24
24
  };
25
- const children = childrenProp || options.map((option) => (jsx(Radio, Object.assign({ disabled: option.disabled, value: option.value }, { children: option.label }), option.value)));
26
- return (jsx(RadioGroupContext.Provider, Object.assign({ value: context }, { children: jsx(InputCheckGroup, Object.assign({}, rest, { ref: ref, role: "radiogroup" }, { children: children }), void 0) }), void 0));
25
+ const children = childrenProp || options.map((option) => (jsx(Radio, { disabled: option.disabled, value: option.value, children: option.label }, option.value)));
26
+ return (jsx(RadioGroupContext.Provider, { value: context, children: jsx(InputCheckGroup, { ...rest, ref: ref, role: "radiogroup", children: children }) }));
27
27
  });
28
28
  var RadioGroup$1 = RadioGroup;
29
29
 
@@ -1,10 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import { SelectInputSize } from '@mezzanine-ui/core/select';
3
+ import { SelectValue } from './typings';
3
4
  import { MenuProps } from '../Menu';
4
5
  import { PopperProps } from '../Popper';
5
6
  import { PickRenameMulti } from '../utils/general';
6
7
  import { SelectTriggerProps, SelectTriggerInputProps } from './SelectTrigger';
7
- export interface AutoCompleteProps extends Omit<SelectTriggerProps, 'active' | 'clearable' | 'forceHideSuffixActionIcon' | 'mode' | 'onClick' | 'onKeyDown' | 'onChange' | 'renderValue' | 'inputProps' | 'suffixActionIcon' | 'value'>, PickRenameMulti<Pick<MenuProps, 'itemsInView' | 'maxHeight' | 'role' | 'size'>, {
8
+ export interface AutoCompleteBaseProps extends Omit<SelectTriggerProps, 'active' | 'clearable' | 'forceHideSuffixActionIcon' | 'mode' | 'onClick' | 'onKeyDown' | 'onChange' | 'renderValue' | 'inputProps' | 'suffixActionIcon' | 'value'>, PickRenameMulti<Pick<MenuProps, 'itemsInView' | 'maxHeight' | 'role' | 'size'>, {
8
9
  maxHeight: 'menuMaxHeight';
9
10
  role: 'menuRole';
10
11
  size: 'menuSize';
@@ -16,10 +17,6 @@ export interface AutoCompleteProps extends Omit<SelectTriggerProps, 'active' | '
16
17
  * @default false
17
18
  */
18
19
  addable?: boolean;
19
- /**
20
- * The default selection
21
- */
22
- defaultValue?: string;
23
20
  /**
24
21
  * Should the filter rules be disabled (If you need to control options filter by yourself)
25
22
  * @default false
@@ -29,15 +26,11 @@ export interface AutoCompleteProps extends Omit<SelectTriggerProps, 'active' | '
29
26
  * The other native props for input element.
30
27
  */
31
28
  inputProps?: Omit<SelectTriggerInputProps, 'onChange' | 'placeholder' | 'role' | 'value' | `aria-${'controls' | 'expanded' | 'owns'}`>;
32
- /**
33
- * The change event handler of input element.
34
- */
35
- onChange?(text: string): any;
36
29
  /**
37
30
  * insert callback whenever insert icon is clicked
38
31
  * return `true` when insert is successfully
39
32
  */
40
- onInsert?(text: string): boolean;
33
+ onInsert?(text: string): SelectValue;
41
34
  /**
42
35
  * The search event handler
43
36
  */
@@ -45,7 +38,7 @@ export interface AutoCompleteProps extends Omit<SelectTriggerProps, 'active' | '
45
38
  /**
46
39
  * The options that mapped autocomplete options
47
40
  */
48
- options: string[];
41
+ options: SelectValue[];
49
42
  /**
50
43
  * select input placeholder
51
44
  */
@@ -60,12 +53,46 @@ export interface AutoCompleteProps extends Omit<SelectTriggerProps, 'active' | '
60
53
  * @default 'medium'
61
54
  */
62
55
  size?: SelectInputSize;
56
+ }
57
+ export declare type AutoCompleteMultipleProps = AutoCompleteBaseProps & {
58
+ /**
59
+ * The default selection
60
+ */
61
+ defaultValue?: SelectValue[];
62
+ /**
63
+ * Controls the layout of trigger.
64
+ */
65
+ mode: 'multiple';
66
+ /**
67
+ * The change event handler of input element.
68
+ */
69
+ onChange?(newOptions: SelectValue[]): any;
63
70
  /**
64
71
  * The value of selection.
65
72
  * @default undefined
66
73
  */
67
- value?: string;
68
- }
74
+ value?: SelectValue[];
75
+ };
76
+ export declare type AutoCompleteSingleProps = AutoCompleteBaseProps & {
77
+ /**
78
+ * The default selection
79
+ */
80
+ defaultValue?: SelectValue;
81
+ /**
82
+ * Controls the layout of trigger.
83
+ */
84
+ mode?: 'single';
85
+ /**
86
+ * The change event handler of input element.
87
+ */
88
+ onChange?(newOptions: SelectValue): any;
89
+ /**
90
+ * The value of selection.
91
+ * @default undefined
92
+ */
93
+ value?: SelectValue | null;
94
+ };
95
+ export declare type AutoCompleteProps = AutoCompleteMultipleProps | AutoCompleteSingleProps;
69
96
  /**
70
97
  * The AutoComplete component for react. <br />
71
98
  * Note that if you need search for ONLY given options, not included your typings,
@@ -1,7 +1,8 @@
1
- import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { forwardRef, useContext, useState, useRef } from 'react';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import { forwardRef, useContext, useState, useRef, useMemo } from 'react';
3
3
  import { selectClasses } from '@mezzanine-ui/core/select';
4
4
  import { PlusIcon } from '@mezzanine-ui/icons';
5
+ import isArray from 'lodash/isArray';
5
6
  import { useComposeRefs } from '../hooks/useComposeRefs.js';
6
7
  import Option from './Option.js';
7
8
  import { SelectControlContext } from './SelectControlContext.js';
@@ -10,7 +11,6 @@ import { useClickAway } from '../hooks/useClickAway.js';
10
11
  import SelectTrigger from './SelectTrigger.js';
11
12
  import InputTriggerPopper from '../_internal/InputTriggerPopper/InputTriggerPopper.js';
12
13
  import Menu from '../Menu/Menu.js';
13
- import Empty from '../Empty/Empty.js';
14
14
  import Icon from '../Icon/Icon.js';
15
15
  import { FormControlContext } from '../Form/FormControlContext.js';
16
16
  import cx from 'clsx';
@@ -22,16 +22,18 @@ const MENU_ID = 'mzn-select-autocomplete-menu-id';
22
22
  * should considering using the `Select` component with `onSearch` prop.
23
23
  */
24
24
  const AutoComplete = forwardRef(function Select(props, ref) {
25
- var _a;
25
+ var _a, _b;
26
26
  const { disabled: disabledFromFormControl, fullWidth: fullWidthFromFormControl, required: requiredFromFormControl, severity, } = useContext(FormControlContext) || {};
27
- const { addable = false, className, disabled = disabledFromFormControl || false, disabledOptionsFilter = false, defaultValue, error = severity === 'error' || false, fullWidth = fullWidthFromFormControl || false, inputRef, inputProps, itemsInView = 4, menuMaxHeight, menuRole = 'listbox', menuSize = 'medium', onChange: onChangeProp, onClear: onClearProp, onInsert, onSearch, options: optionsProp, popperOptions = {}, placeholder = '', prefix, required = requiredFromFormControl || false, size = 'medium', value: valueProp, } = props;
27
+ const { addable = false, className, disabled = disabledFromFormControl || false, disabledOptionsFilter = false, defaultValue, error = severity === 'error' || false, fullWidth = fullWidthFromFormControl || false, inputRef, inputProps, itemsInView = 4, menuMaxHeight, menuRole = 'listbox', menuSize = 'medium', mode = 'single', onChange: onChangeProp, onClear: onClearProp, onInsert, onSearch, options: optionsProp, popperOptions = {}, placeholder = '', prefix, required = requiredFromFormControl || false, size = 'medium', value: valueProp, } = props;
28
28
  const [open, toggleOpen] = useState(false);
29
- const { focused, onFocus, onChange, onClear, options, searchText, setSearchText, setValue, value, } = useAutoCompleteValueControl({
29
+ const { focused, onFocus, onChange, onClear, options, searchText, selectedOptions, setSearchText, unselectedOptions, value, } = useAutoCompleteValueControl({
30
30
  defaultValue,
31
31
  disabledOptionsFilter,
32
+ mode,
32
33
  onChange: onChangeProp,
33
34
  onClear: onClearProp,
34
35
  onClose: () => toggleOpen(false),
36
+ onSearch,
35
37
  options: optionsProp,
36
38
  value: valueProp,
37
39
  });
@@ -41,6 +43,7 @@ const AutoComplete = forwardRef(function Select(props, ref) {
41
43
  const controlRef = useRef(null);
42
44
  const popperRef = useRef(null);
43
45
  const composedRef = useComposeRefs([ref, controlRef]);
46
+ const renderValue = focused ? () => searchText : undefined;
44
47
  useClickAway(() => {
45
48
  if (!open || focused)
46
49
  return;
@@ -53,11 +56,17 @@ const AutoComplete = forwardRef(function Select(props, ref) {
53
56
  open,
54
57
  toggleOpen,
55
58
  ]);
59
+ function getPlaceholder() {
60
+ if (focused && value && !isArray(value)) {
61
+ return value.name;
62
+ }
63
+ return placeholder;
64
+ }
56
65
  /** Trigger input props */
57
66
  const onSearchInputChange = (e) => {
58
67
  /** should sync both search input and value */
59
68
  setSearchText(e.target.value);
60
- setValue(e.target.value);
69
+ setInsertText(e.target.value);
61
70
  /** return current value to onSearch */
62
71
  onSearch === null || onSearch === void 0 ? void 0 : onSearch(e.target.value);
63
72
  };
@@ -73,6 +82,9 @@ const AutoComplete = forwardRef(function Select(props, ref) {
73
82
  onFocus(false);
74
83
  (_a = inputProps === null || inputProps === void 0 ? void 0 : inputProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(inputProps, e);
75
84
  };
85
+ const onClickSuffixActionIcon = () => {
86
+ toggleOpen((prev) => !prev);
87
+ };
76
88
  const resolvedInputProps = {
77
89
  ...inputProps,
78
90
  'aria-controls': MENU_ID,
@@ -81,30 +93,27 @@ const AutoComplete = forwardRef(function Select(props, ref) {
81
93
  onBlur: onSearchInputBlur,
82
94
  onChange: onSearchInputChange,
83
95
  onFocus: onSearchInputFocus,
84
- placeholder,
96
+ placeholder: getPlaceholder(),
85
97
  role: 'combobox',
86
98
  };
87
- return (jsx(SelectControlContext.Provider, Object.assign({ value: {
88
- onChange,
89
- value,
90
- } }, { children: jsxs("div", Object.assign({ ref: nodeRef, className: cx(selectClasses.host, {
99
+ const searchTextExistWithoutOption = !!searchText && options.find((option) => option.name === searchText) === undefined;
100
+ const context = useMemo(() => ({
101
+ onChange,
102
+ value,
103
+ }), [onChange, value]);
104
+ return (jsx(SelectControlContext.Provider, { value: context, children: jsxs("div", { ref: nodeRef, className: cx(selectClasses.host, {
91
105
  [selectClasses.hostFullWidth]: fullWidth,
92
- }) }, { children: [jsx(SelectTrigger, { ref: composedRef, active: open, className: className, clearable: true, disabled: disabled, error: error, forceHideSuffixActionIcon: true, fullWidth: fullWidth, inputRef: inputRef, mode: "single", onTagClose: onChange, onClear: onClear, prefix: prefix, readOnly: false, required: required, inputProps: resolvedInputProps, size: size, suffixActionIcon: undefined, value: value }, void 0),
93
- jsxs(InputTriggerPopper, Object.assign({ ref: popperRef, anchor: controlRef, className: selectClasses.popper, open: open, sameWidth: true, options: popperOptions }, { children: [jsxs(Menu, Object.assign({ id: MENU_ID, "aria-activedescendant": (_a = value === null || value === void 0 ? void 0 : value.id) !== null && _a !== void 0 ? _a : '', itemsInView: itemsInView, maxHeight: menuMaxHeight, role: menuRole, size: menuSize, style: { border: 0 } }, { children: [jsx(Option, Object.assign({ value: searchText }, { children: searchText }), void 0),
94
- options.length ? options.map((option) => (jsx(Option, Object.assign({ value: option }, { children: option }), option))) : (jsx(Empty, { children: "\u67E5\u7121\u8CC7\u6599" }, void 0))] }), void 0),
95
- addable ? (jsxs("div", Object.assign({ className: selectClasses.autoComplete }, { children: [jsx("input", { type: "text", onChange: (e) => setInsertText(e.target.value), onClick: (e) => e.stopPropagation(), onFocus: (e) => e.stopPropagation(), placeholder: "\u65B0\u589E\u9078\u9805", value: insertText }, void 0),
96
- jsx(Icon, { className: cx(selectClasses.autoCompleteIcon, {
97
- [selectClasses.autoCompleteIconActive]: !!insertText,
98
- }), icon: PlusIcon, onClick: (e) => {
99
- var _a;
100
- e.stopPropagation();
101
- if (insertText) {
102
- const insertSuccess = (_a = onInsert === null || onInsert === void 0 ? void 0 : onInsert(insertText)) !== null && _a !== void 0 ? _a : false;
103
- if (insertSuccess) {
104
- setInsertText('');
105
- }
106
- }
107
- } }, void 0)] }), void 0)) : null] }), void 0)] }), void 0) }), void 0));
106
+ }), children: [jsx(SelectTrigger, { ref: composedRef, active: open, className: className, clearable: true, disabled: disabled, ellipsis: true, error: error, fullWidth: fullWidth, inputRef: inputRef, mode: mode, onTagClose: onChange, onClear: onClear, prefix: prefix, readOnly: false, required: required, inputProps: resolvedInputProps, searchText: searchText, size: size, showTextInputAfterTags: true, suffixAction: onClickSuffixActionIcon, value: value, renderValue: renderValue }), jsxs(InputTriggerPopper, { ref: popperRef, anchor: controlRef, className: selectClasses.popper, open: open, sameWidth: true, options: popperOptions, children: [options.length ? (jsx(Menu, { id: MENU_ID, "aria-activedescendant": Array.isArray(value) ? (_b = (_a = value === null || value === void 0 ? void 0 : value[0]) === null || _a === void 0 ? void 0 : _a.id) !== null && _b !== void 0 ? _b : '' : value === null || value === void 0 ? void 0 : value.id, itemsInView: itemsInView, maxHeight: menuMaxHeight, role: menuRole, size: menuSize, style: { border: 0 }, children: mode === 'single' ? (jsx(Fragment, { children: options.map((option) => (jsx(Option, { value: option.id, children: option.name }, option.id))) })) : (jsxs(Fragment, { children: [selectedOptions.map((option) => (jsx(Option, { value: option.id, children: option.name }, option.id))), unselectedOptions.map((option) => (jsx(Option, { value: option.id, children: option.name }, option.id)))] })) })) : null, searchTextExistWithoutOption && addable ? (jsxs("button", { type: "button", className: selectClasses.autoComplete, onClick: (e) => {
107
+ var _a;
108
+ e.stopPropagation();
109
+ if (insertText) {
110
+ const newOption = (_a = onInsert === null || onInsert === void 0 ? void 0 : onInsert(insertText)) !== null && _a !== void 0 ? _a : null;
111
+ if (newOption) {
112
+ setInsertText('');
113
+ onChange(newOption);
114
+ }
115
+ }
116
+ }, children: [jsx("p", { children: insertText }), jsx(Icon, { className: selectClasses.autoCompleteIcon, icon: PlusIcon })] })) : null] })] }) }));
108
117
  });
109
118
  var AutoComplete$1 = AutoComplete;
110
119
 
package/Select/Option.js CHANGED
@@ -35,10 +35,10 @@ const Option = forwardRef(function Option(props, ref) {
35
35
  break;
36
36
  }
37
37
  };
38
- return (jsx(MenuItem, Object.assign({}, rest, { ref: ref, active: active, "aria-selected": active, id: value, onClick: (evt) => {
38
+ return (jsx(MenuItem, { ...rest, ref: ref, active: active, "aria-selected": active, id: value, onClick: (evt) => {
39
39
  evt.stopPropagation();
40
40
  onSelect();
41
- }, onKeyDown: onKeyDown, role: role, tabIndex: 0 }, { children: children }), void 0));
41
+ }, onKeyDown: onKeyDown, role: role, tabIndex: 0, children: children }));
42
42
  });
43
43
  var Option$1 = Option;
44
44
 
@@ -6,7 +6,7 @@ import { PopperProps } from '../Popper';
6
6
  import { SelectValue } from './typings';
7
7
  import { PickRenameMulti } from '../utils/general';
8
8
  import { SelectTriggerProps, SelectTriggerInputProps } from './SelectTrigger';
9
- export interface SelectBaseProps extends Omit<SelectTriggerProps, 'active' | 'inputProps' | 'mode' | 'onBlur' | 'onChange' | 'onClick' | 'onFocus' | 'onKeyDown' | 'renderValue' | 'value'>, FormElementFocusHandlers, PickRenameMulti<Pick<MenuProps, 'itemsInView' | 'maxHeight' | 'role' | 'size'>, {
9
+ export interface SelectBaseProps extends Omit<SelectTriggerProps, 'active' | 'inputProps' | 'mode' | 'onBlur' | 'onChange' | 'onClick' | 'onFocus' | 'onKeyDown' | 'readOnly' | 'renderValue' | 'value'>, FormElementFocusHandlers, PickRenameMulti<Pick<MenuProps, 'itemsInView' | 'maxHeight' | 'role' | 'size'>, {
10
10
  maxHeight: 'menuMaxHeight';
11
11
  role: 'menuRole';
12
12
  size: 'menuSize';
@@ -17,10 +17,6 @@ export interface SelectBaseProps extends Omit<SelectTriggerProps, 'active' | 'in
17
17
  * The other native props for input element.
18
18
  */
19
19
  inputProps?: Omit<SelectTriggerInputProps, 'onBlur' | 'onChange' | 'onFocus' | 'placeholder' | 'role' | 'value' | `aria-${'controls' | 'expanded' | 'owns'}`>;
20
- /**
21
- * The search event handler, this prop won't work when mode is `multiple`
22
- */
23
- onSearch?(input: string): any;
24
20
  /**
25
21
  * select input placeholder
26
22
  */
@@ -87,49 +83,5 @@ export declare type SelectSingleProps = SelectBaseProps & {
87
83
  value?: SelectValue | null;
88
84
  };
89
85
  export declare type SelectProps = SelectMultipleProps | SelectSingleProps;
90
- declare const Select: import("react").ForwardRefExoticComponent<(SelectBaseProps & {
91
- /**
92
- * The default selection
93
- */
94
- defaultValue?: SelectValue[] | undefined;
95
- /**
96
- * Controls the layout of trigger.
97
- */
98
- mode: 'multiple';
99
- /**
100
- * The change event handler of input element.
101
- */
102
- onChange?(newOptions: SelectValue[]): any;
103
- /**
104
- * To customize rendering select input value
105
- */
106
- renderValue?(values: SelectValue[]): string;
107
- /**
108
- * The value of selection.
109
- * @default undefined
110
- */
111
- value?: SelectValue[] | undefined;
112
- } & import("react").RefAttributes<HTMLDivElement>) | (SelectBaseProps & {
113
- /**
114
- * The default selection
115
- */
116
- defaultValue?: SelectValue | undefined;
117
- /**
118
- * Controls the layout of trigger.
119
- */
120
- mode?: "single" | undefined;
121
- /**
122
- * The change event handler of input element.
123
- */
124
- onChange?(newOptions: SelectValue): any;
125
- /**
126
- * To customize rendering select input value
127
- */
128
- renderValue?(values: SelectValue | null): string;
129
- /**
130
- * The value of selection.
131
- * @default undefined
132
- */
133
- value?: SelectValue | null | undefined;
134
- } & import("react").RefAttributes<HTMLDivElement>)>;
86
+ declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLDivElement>>;
135
87
  export default Select;