rsuite 5.16.0 → 5.16.1

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.
@@ -1,10 +1,10 @@
1
1
  import React, { Ref } from 'react';
2
2
  import { PickerLocale } from '../locales';
3
- import { PickerInstance } from '../Picker';
3
+ import { PickerInstance, PickerToggleProps } from '../Picker';
4
4
  import { ItemDataType, FormControlPickerProps } from '../@types/common';
5
5
  import type { MultipleSelectProps } from '../SelectPicker';
6
6
  export declare type ValueType = (number | string)[];
7
- export interface CheckPickerProps<T> extends FormControlPickerProps<T[], PickerLocale, ItemDataType<T>>, MultipleSelectProps<T> {
7
+ export interface CheckPickerProps<T> extends FormControlPickerProps<T[], PickerLocale, ItemDataType<T>>, MultipleSelectProps<T>, Pick<PickerToggleProps, 'label'> {
8
8
  /** Top the selected option in the options */
9
9
  sticky?: boolean;
10
10
  /** A picker that can be counted */
@@ -68,4 +68,10 @@ var pickerRef = /*#__PURE__*/React.createRef();
68
68
  React.createElement(CheckPicker, {
69
69
  ref: pickerRef,
70
70
  data: []
71
+ }); // With a label
72
+
73
+ /*#__PURE__*/
74
+ React.createElement(CheckPicker, {
75
+ label: "User",
76
+ data: []
71
77
  });
@@ -1,6 +1,6 @@
1
1
  import React, { Ref } from 'react';
2
2
  import { PickerLocale } from '../locales';
3
- import { PickerInstance } from '../Picker';
3
+ import { PickerInstance, PickerToggleProps } from '../Picker';
4
4
  import { FormControlPickerProps, ItemDataType } from '../@types/common';
5
5
  import { ListProps } from 'react-virtualized/dist/commonjs/List';
6
6
  export interface SelectProps<T> {
@@ -40,7 +40,7 @@ export interface MultipleSelectProps<T> extends Omit<SelectProps<T>, 'renderValu
40
40
  /** Custom render selected items */
41
41
  renderValue?: (value: T[], item: ItemDataType<T>[], selectedElement: React.ReactNode) => React.ReactNode;
42
42
  }
43
- export interface SelectPickerProps<T> extends FormControlPickerProps<T, PickerLocale, ItemDataType<T>>, SelectProps<T> {
43
+ export interface SelectPickerProps<T> extends FormControlPickerProps<T, PickerLocale, ItemDataType<T>>, SelectProps<T>, Pick<PickerToggleProps, 'label'> {
44
44
  }
45
45
  export interface SelectPickerComponent {
46
46
  <T>(props: SelectPickerProps<T> & {
@@ -56,4 +56,10 @@ var pickerRef = /*#__PURE__*/React.createRef();
56
56
  React.createElement(SelectPicker, {
57
57
  ref: pickerRef,
58
58
  data: []
59
+ }); // With a label
60
+
61
+ /*#__PURE__*/
62
+ React.createElement(SelectPicker, {
63
+ label: "User",
64
+ data: []
59
65
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsuite",
3
- "version": "5.16.0",
3
+ "version": "5.16.1",
4
4
  "description": "A suite of react components",
5
5
  "main": "cjs/index.js",
6
6
  "module": "esm/index.js",