@rc-component/select 1.0.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 (137) hide show
  1. package/LICENSE.md +9 -0
  2. package/README.md +191 -0
  3. package/assets/index.css +306 -0
  4. package/assets/index.less +397 -0
  5. package/es/BaseSelect/Polite.d.ts +7 -0
  6. package/es/BaseSelect/Polite.js +26 -0
  7. package/es/BaseSelect/index.d.ts +118 -0
  8. package/es/BaseSelect/index.js +569 -0
  9. package/es/OptGroup.d.ts +12 -0
  10. package/es/OptGroup.js +6 -0
  11. package/es/Option.d.ts +14 -0
  12. package/es/Option.js +6 -0
  13. package/es/OptionList.d.ts +10 -0
  14. package/es/OptionList.js +379 -0
  15. package/es/Select.d.ts +114 -0
  16. package/es/Select.js +480 -0
  17. package/es/SelectContext.d.ts +23 -0
  18. package/es/SelectContext.js +6 -0
  19. package/es/SelectTrigger.d.ts +30 -0
  20. package/es/SelectTrigger.js +138 -0
  21. package/es/Selector/Input.d.ts +27 -0
  22. package/es/Selector/Input.js +114 -0
  23. package/es/Selector/MultipleSelector.d.ts +16 -0
  24. package/es/Selector/MultipleSelector.js +185 -0
  25. package/es/Selector/SingleSelector.d.ts +8 -0
  26. package/es/Selector/SingleSelector.js +104 -0
  27. package/es/Selector/index.d.ts +85 -0
  28. package/es/Selector/index.js +184 -0
  29. package/es/TransBtn.d.ts +12 -0
  30. package/es/TransBtn.js +30 -0
  31. package/es/hooks/useAllowClear.d.ts +8 -0
  32. package/es/hooks/useAllowClear.js +26 -0
  33. package/es/hooks/useBaseProps.d.ts +13 -0
  34. package/es/hooks/useBaseProps.js +10 -0
  35. package/es/hooks/useCache.d.ts +7 -0
  36. package/es/hooks/useCache.js +40 -0
  37. package/es/hooks/useDelayReset.d.ts +5 -0
  38. package/es/hooks/useDelayReset.js +24 -0
  39. package/es/hooks/useFilterOptions.d.ts +3 -0
  40. package/es/hooks/useFilterOptions.js +57 -0
  41. package/es/hooks/useId.d.ts +5 -0
  42. package/es/hooks/useId.js +29 -0
  43. package/es/hooks/useLayoutEffect.d.ts +5 -0
  44. package/es/hooks/useLayoutEffect.js +17 -0
  45. package/es/hooks/useLock.d.ts +7 -0
  46. package/es/hooks/useLock.js +27 -0
  47. package/es/hooks/useOptions.d.ts +12 -0
  48. package/es/hooks/useOptions.js +45 -0
  49. package/es/hooks/useRefFunc.d.ts +5 -0
  50. package/es/hooks/useRefFunc.js +14 -0
  51. package/es/hooks/useSelectTriggerControl.d.ts +1 -0
  52. package/es/hooks/useSelectTriggerControl.js +27 -0
  53. package/es/index.d.ts +10 -0
  54. package/es/index.js +7 -0
  55. package/es/interface.d.ts +23 -0
  56. package/es/interface.js +1 -0
  57. package/es/utils/__mocks__/platformUtil.d.ts +1 -0
  58. package/es/utils/__mocks__/platformUtil.js +3 -0
  59. package/es/utils/commonUtil.d.ts +9 -0
  60. package/es/utils/commonUtil.js +32 -0
  61. package/es/utils/keyUtil.d.ts +2 -0
  62. package/es/utils/keyUtil.js +16 -0
  63. package/es/utils/legacyUtil.d.ts +3 -0
  64. package/es/utils/legacyUtil.js +44 -0
  65. package/es/utils/platformUtil.d.ts +1 -0
  66. package/es/utils/platformUtil.js +4 -0
  67. package/es/utils/valueUtil.d.ts +24 -0
  68. package/es/utils/valueUtil.js +128 -0
  69. package/es/utils/warningPropsUtil.d.ts +4 -0
  70. package/es/utils/warningPropsUtil.js +119 -0
  71. package/lib/BaseSelect/Polite.d.ts +7 -0
  72. package/lib/BaseSelect/Polite.js +34 -0
  73. package/lib/BaseSelect/index.d.ts +118 -0
  74. package/lib/BaseSelect/index.js +579 -0
  75. package/lib/OptGroup.d.ts +12 -0
  76. package/lib/OptGroup.js +12 -0
  77. package/lib/Option.d.ts +14 -0
  78. package/lib/Option.js +12 -0
  79. package/lib/OptionList.d.ts +10 -0
  80. package/lib/OptionList.js +387 -0
  81. package/lib/Select.d.ts +114 -0
  82. package/lib/Select.js +487 -0
  83. package/lib/SelectContext.d.ts +23 -0
  84. package/lib/SelectContext.js +13 -0
  85. package/lib/SelectTrigger.d.ts +30 -0
  86. package/lib/SelectTrigger.js +147 -0
  87. package/lib/Selector/Input.d.ts +27 -0
  88. package/lib/Selector/Input.js +123 -0
  89. package/lib/Selector/MultipleSelector.d.ts +16 -0
  90. package/lib/Selector/MultipleSelector.js +194 -0
  91. package/lib/Selector/SingleSelector.d.ts +8 -0
  92. package/lib/Selector/SingleSelector.js +113 -0
  93. package/lib/Selector/index.d.ts +85 -0
  94. package/lib/Selector/index.js +191 -0
  95. package/lib/TransBtn.d.ts +12 -0
  96. package/lib/TransBtn.js +39 -0
  97. package/lib/hooks/useAllowClear.d.ts +8 -0
  98. package/lib/hooks/useAllowClear.js +34 -0
  99. package/lib/hooks/useBaseProps.d.ts +13 -0
  100. package/lib/hooks/useBaseProps.js +19 -0
  101. package/lib/hooks/useCache.d.ts +7 -0
  102. package/lib/hooks/useCache.js +49 -0
  103. package/lib/hooks/useDelayReset.d.ts +5 -0
  104. package/lib/hooks/useDelayReset.js +31 -0
  105. package/lib/hooks/useFilterOptions.d.ts +3 -0
  106. package/lib/hooks/useFilterOptions.js +66 -0
  107. package/lib/hooks/useId.d.ts +5 -0
  108. package/lib/hooks/useId.js +40 -0
  109. package/lib/hooks/useLayoutEffect.d.ts +5 -0
  110. package/lib/hooks/useLayoutEffect.js +25 -0
  111. package/lib/hooks/useLock.d.ts +7 -0
  112. package/lib/hooks/useLock.js +34 -0
  113. package/lib/hooks/useOptions.d.ts +12 -0
  114. package/lib/hooks/useOptions.js +52 -0
  115. package/lib/hooks/useRefFunc.d.ts +5 -0
  116. package/lib/hooks/useRefFunc.js +21 -0
  117. package/lib/hooks/useSelectTriggerControl.d.ts +1 -0
  118. package/lib/hooks/useSelectTriggerControl.js +35 -0
  119. package/lib/index.d.ts +10 -0
  120. package/lib/index.js +37 -0
  121. package/lib/interface.d.ts +23 -0
  122. package/lib/interface.js +5 -0
  123. package/lib/utils/__mocks__/platformUtil.d.ts +1 -0
  124. package/lib/utils/__mocks__/platformUtil.js +9 -0
  125. package/lib/utils/commonUtil.d.ts +9 -0
  126. package/lib/utils/commonUtil.js +42 -0
  127. package/lib/utils/keyUtil.d.ts +2 -0
  128. package/lib/utils/keyUtil.js +22 -0
  129. package/lib/utils/legacyUtil.d.ts +3 -0
  130. package/lib/utils/legacyUtil.js +53 -0
  131. package/lib/utils/platformUtil.d.ts +1 -0
  132. package/lib/utils/platformUtil.js +10 -0
  133. package/lib/utils/valueUtil.d.ts +24 -0
  134. package/lib/utils/valueUtil.js +140 -0
  135. package/lib/utils/warningPropsUtil.d.ts +4 -0
  136. package/lib/utils/warningPropsUtil.js +129 -0
  137. package/package.json +86 -0
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014-present alipay.com
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,191 @@
1
+ # rc-select
2
+
3
+ ---
4
+
5
+ React Select Component.
6
+
7
+ <!-- prettier-ignore -->
8
+ [![NPM version][npm-image]][npm-url]
9
+ [![npm download][download-image]][download-url]
10
+ [![build status][github-actions-image]][github-actions-url]
11
+ [![Codecov][codecov-image]][codecov-url]
12
+ [![bundle size][bundlephobia-image]][bundlephobia-url]
13
+ [![dumi][dumi-image]][dumi-url]
14
+
15
+ [npm-image]: http://img.shields.io/npm/v/rc-select.svg?style=flat-square
16
+ [npm-url]: http://npmjs.org/package/rc-select
17
+ [travis-image]: https://img.shields.io/travis/react-component/select/master?style=flat-square
18
+ [travis-url]: https://travis-ci.com/react-component/select
19
+ [github-actions-image]: https://github.com/react-component/select/workflows/CI/badge.svg
20
+ [github-actions-url]: https://github.com/react-component/select/actions
21
+ [codecov-image]: https://img.shields.io/codecov/c/github/react-component/select/master.svg?style=flat-square
22
+ [codecov-url]: https://app.codecov.io/gh/react-component/select
23
+ [david-url]: https://david-dm.org/react-component/select
24
+ [david-image]: https://david-dm.org/react-component/select/status.svg?style=flat-square
25
+ [david-dev-url]: https://david-dm.org/react-component/select?type=dev
26
+ [david-dev-image]: https://david-dm.org/react-component/select/dev-status.svg?style=flat-square
27
+ [download-image]: https://img.shields.io/npm/dm/rc-select.svg?style=flat-square
28
+ [download-url]: https://npmjs.org/package/rc-select
29
+ [bundlephobia-url]: https://bundlephobia.com/package/rc-select
30
+ [bundlephobia-image]: https://badgen.net/bundlephobia/minzip/rc-select
31
+ [dumi-url]: https://github.com/umijs/dumi
32
+ [dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square
33
+
34
+ ## Screenshots
35
+
36
+ <img src="https://gw.alipayobjects.com/zos/antfincdn/d13eUZlgdJ/tupian.png" />
37
+
38
+ ## Feature
39
+
40
+ - support IE11+,Chrome,Firefox,Safari
41
+
42
+ ### Keyboard
43
+
44
+ - Open select (focus input || focus and click)
45
+ - KeyDown/KeyUp/Enter to navigate menu
46
+
47
+ ## install
48
+
49
+ [![rc-select](https://nodei.co/npm/rc-select.png)](https://npmjs.org/package/rc-select)
50
+
51
+ ## Usage
52
+
53
+ ### basic use
54
+
55
+ ```jsx | pure
56
+ import Select, { Option } from 'rc-select';
57
+ import 'rc-select/assets/index.css';
58
+
59
+ export default () => (
60
+ <Select>
61
+ <Option value="jack">jack</Option>
62
+ <Option value="lucy">lucy</Option>
63
+ <Option value="yiminghe">yiminghe</Option>
64
+ </Select>
65
+ );
66
+ ```
67
+
68
+ ## API
69
+
70
+ ### Select props
71
+
72
+ <!-- prettier-ignore -->
73
+ | name | description | type | default |
74
+ | --- | --- | --- | --- |
75
+ | id | html id to set on the component wrapper | String | '' |
76
+ | className | additional css class of root dom node | String | '' |
77
+ | data-\* | html data attributes to set on the component wrapper | String | '' |
78
+ | prefixCls | prefix class | String | '' |
79
+ | animation | dropdown animation name. only support slide-up now | String | '' |
80
+ | transitionName | dropdown css animation name | String | '' |
81
+ | choiceTransitionName | css animation name for selected items at multiple mode | String | '' |
82
+ | dropdownMatchSelectWidth | whether dropdown's width is same with select | boolean | true |
83
+ | dropdownClassName | additional className applied to dropdown | String | - |
84
+ | dropdownStyle | additional style applied to dropdown | React.CSSProperties | {} |
85
+ | dropdownAlign | additional align applied to dropdown | [AlignType](https://github.com/react-component/trigger/blob/728d7e92394aa4b3214650f743fc47e1382dfa68/src/interface.ts#L25-L80) | {} |
86
+ | dropdownMenuStyle | additional style applied to dropdown menu | Object | React.CSSProperties |
87
+ | notFoundContent | specify content to show when no result matches. | ReactNode | 'Not Found' |
88
+ | tokenSeparators | separator used to tokenize on tag/multiple mode | string[]? | |
89
+ | open | control select open | boolean | |
90
+ | defaultOpen | control select default open | boolean | |
91
+ | placeholder | select placeholder | React Node | |
92
+ | showSearch | whether show search input in single mode | boolean | true |
93
+ | allowClear | whether allowClear | boolean | { clearIcon?: ReactNode } | false |
94
+ | tags | when tagging is enabled the user can select from pre-existing options or create a new tag by picking the first choice, which is what the user has typed into the search box so far. | boolean | false |
95
+ | tagRender | render custom tags. | (props: CustomTagProps) => ReactNode | - |
96
+ | maxTagTextLength | max tag text length to show | number | - |
97
+ | maxTagCount | max tag count to show | number | - |
98
+ | maxTagPlaceholder | placeholder for omitted values | ReactNode/function(omittedValues) | - |
99
+ | combobox | enable combobox mode(can not set multiple at the same time) | boolean | false |
100
+ | multiple | whether multiple select | boolean | false |
101
+ | disabled | whether disabled select | boolean | false |
102
+ | filterOption | whether filter options by input value. default filter by option's optionFilterProp prop's value | boolean | true/Function(inputValue:string, option:Option) |
103
+ | optionFilterProp | which prop value of option will be used for filter if filterOption is true | String | 'value' |
104
+ | filterSort | Sort function for search options sorting, see [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort)'s compareFunction. | Function(optionA:Option, optionB: Option) | - |
105
+ | optionLabelProp | render option value or option children as content of select | String: 'value'/'children' | 'value' |
106
+ | defaultValue | initial selected option(s) | String \| String[] | - |
107
+ | value | current selected option(s) | String \| String[] \| {key:String, label:React.Node} \| {key:String, label:React.Node}[] | - |
108
+ | labelInValue | whether to embed label in value, see above value type. Not support `combobox` mode | boolean | false |
109
+ | backfill | whether backfill select option to search input (Only works in single and combobox mode) | boolean | false |
110
+ | onChange | called when select an option or input value change(combobox) | function(value, option:Option \| Option[]) | - |
111
+ | onSearch | called when input changed | function | - |
112
+ | onBlur | called when blur | function | - |
113
+ | onFocus | called when focus | function | - |
114
+ | onPopupScroll | called when menu is scrolled | function | - |
115
+ | onSelect | called when a option is selected. param is option's value and option instance | Function(value, option:Option) | - |
116
+ | onDeselect | called when a option is deselected. param is option's value. only called for multiple or tags | Function(value, option:Option) | - |
117
+ | onInputKeyDown | called when key down on input | Function(event) | - |
118
+ | defaultActiveFirstOption | whether active first option by default | boolean | true |
119
+ | getPopupContainer | container which popup select menu rendered into | function(trigger:Node):Node | function(){return document.body;} |
120
+ | getInputElement | customize input element | function(): Element | - |
121
+ | showAction | actions trigger the dropdown to show | String[]? | - |
122
+ | autoFocus | focus select after mount | boolean | - |
123
+ | autoClearSearchValue | auto clear search input value when multiple select is selected/deselected | boolean | true |
124
+ | prefix | specify the select prefix icon or text | ReactNode | - |
125
+ | suffixIcon | specify the select arrow icon | ReactNode | - |
126
+ | clearIcon | specify the clear icon | ReactNode | - |
127
+ | removeIcon | specify the remove icon | ReactNode | - |
128
+ | menuItemSelectedIcon | specify the item selected icon | ReactNode \| (props: MenuItemProps) => ReactNode | - |
129
+ | dropdownRender | render custom dropdown menu | (menu: React.Node) => ReactNode | - |
130
+ | loading | show loading icon in arrow | boolean | false |
131
+ | virtual | Disable virtual scroll | boolean | true |
132
+ | direction | direction of dropdown | 'ltr' \| 'rtl' | 'ltr' |
133
+ | optionRender | Custom rendering options | (oriOption: FlattenOptionData\<BaseOptionType\> , info: { index: number }) => React.ReactNode | - |
134
+ | labelRender | Custom rendering label | (props: LabelInValueType) => React.ReactNode | - |
135
+ | maxCount | The max number of items can be selected | number | - |
136
+
137
+ ### Methods
138
+
139
+ | name | description | parameters | return |
140
+ | ----- | ------------------------- | ---------- | ------ |
141
+ | focus | focus select programmably | - | - |
142
+ | blur | blur select programmably | - | - |
143
+
144
+ ### Option props
145
+
146
+ | name | description | type | default |
147
+ | --- | --- | --- | --- |
148
+ | className | additional class to option | String | '' |
149
+ | disabled | no effect for click or keydown for this item | boolean | false |
150
+ | key | if react want you to set key, then key is same as value, you can omit value | String/number | - |
151
+ | value | default filter by this attribute. if react want you to set key, then key is same as value, you can omit value | String/number | - |
152
+ | title | if you are not satisfied with auto-generated `title` which is show while hovering on selected value, you can customize it with this property | String | - |
153
+
154
+ ### OptGroup props
155
+
156
+ | name | description | type | default |
157
+ | --- | --- | --- | --- |
158
+ | label | group label | String/React.Element | - |
159
+ | key | - | String | - |
160
+ | value | default filter by this attribute. if react want you to set key, then key is same as value, you can omit value | String | - |
161
+ | className | same as `Option props` | String | '' |
162
+ | title | same as `Option props` | String | - |
163
+
164
+ ## Development
165
+
166
+ ```
167
+ npm install
168
+ npm start
169
+ ```
170
+
171
+ ## Example
172
+
173
+ local example: http://localhost:9001/
174
+
175
+ online example: http://select.react-component.now.sh/
176
+
177
+ ## Test Case
178
+
179
+ ```
180
+ npm test
181
+ ```
182
+
183
+ ## Coverage
184
+
185
+ ```
186
+ npm run coverage
187
+ ```
188
+
189
+ ## License
190
+
191
+ rc-select is released under the MIT license.
@@ -0,0 +1,306 @@
1
+ * {
2
+ box-sizing: border-box;
3
+ }
4
+ .rc-select {
5
+ display: inline-block;
6
+ font-size: 12px;
7
+ width: 100px;
8
+ position: relative;
9
+ }
10
+ .rc-select-disabled,
11
+ .rc-select-disabled input {
12
+ cursor: not-allowed;
13
+ }
14
+ .rc-select-disabled .rc-select-selector {
15
+ opacity: 0.3;
16
+ }
17
+ .rc-select-show-arrow.rc-select-loading .rc-select-arrow-icon::after {
18
+ box-sizing: border-box;
19
+ width: 12px;
20
+ height: 12px;
21
+ border-radius: 100%;
22
+ border: 2px solid #999;
23
+ border-top-color: transparent;
24
+ border-bottom-color: transparent;
25
+ transform: none;
26
+ margin-top: 4px;
27
+ animation: rcSelectLoadingIcon 0.5s infinite;
28
+ }
29
+ .rc-select .rc-select-selection-placeholder {
30
+ opacity: 0.4;
31
+ pointer-events: none;
32
+ }
33
+ .rc-select .rc-select-selection-search-input {
34
+ appearance: none;
35
+ }
36
+ .rc-select .rc-select-selection-search-input::-webkit-search-cancel-button {
37
+ display: none;
38
+ appearance: none;
39
+ }
40
+ .rc-select-single .rc-select-selector {
41
+ display: flex;
42
+ position: relative;
43
+ }
44
+ .rc-select-single .rc-select-selector .rc-select-selection-wrap {
45
+ width: 100%;
46
+ position: relative;
47
+ }
48
+ .rc-select-single .rc-select-selector .rc-select-selection-search {
49
+ width: 100%;
50
+ position: relative;
51
+ }
52
+ .rc-select-single .rc-select-selector .rc-select-selection-search-input {
53
+ width: 100%;
54
+ }
55
+ .rc-select-single .rc-select-selector .rc-select-selection-item,
56
+ .rc-select-single .rc-select-selector .rc-select-selection-placeholder {
57
+ position: absolute;
58
+ top: 1px;
59
+ left: 3px;
60
+ pointer-events: none;
61
+ font-weight: normal;
62
+ }
63
+ .rc-select-single:not(.rc-select-customize-input) .rc-select-selector {
64
+ padding: 1px;
65
+ border: 1px solid #000;
66
+ }
67
+ .rc-select-single:not(.rc-select-customize-input) .rc-select-selector .rc-select-selection-search-input {
68
+ border: none;
69
+ outline: none;
70
+ background: rgba(255, 0, 0, 0.2);
71
+ width: 100%;
72
+ }
73
+ .rc-select-multiple .rc-select-selector {
74
+ display: flex;
75
+ padding: 1px;
76
+ border: 1px solid #000;
77
+ }
78
+ .rc-select-multiple .rc-select-selector .rc-select-selection-item {
79
+ flex: none;
80
+ background: #bbb;
81
+ border-radius: 4px;
82
+ margin-right: 2px;
83
+ padding: 0 8px;
84
+ }
85
+ .rc-select-multiple .rc-select-selector .rc-select-selection-item-disabled {
86
+ cursor: not-allowed;
87
+ opacity: 0.5;
88
+ }
89
+ .rc-select-multiple .rc-select-selector .rc-select-selection-overflow {
90
+ display: flex;
91
+ flex-wrap: wrap;
92
+ }
93
+ .rc-select-multiple .rc-select-selector .rc-select-selection-overflow-item {
94
+ flex: none;
95
+ max-width: 100%;
96
+ }
97
+ .rc-select-multiple .rc-select-selector .rc-select-selection-search {
98
+ position: relative;
99
+ max-width: 100%;
100
+ }
101
+ .rc-select-multiple .rc-select-selector .rc-select-selection-search-input,
102
+ .rc-select-multiple .rc-select-selector .rc-select-selection-search-mirror {
103
+ padding: 1px;
104
+ font-family: system-ui;
105
+ }
106
+ .rc-select-multiple .rc-select-selector .rc-select-selection-search-mirror {
107
+ position: absolute;
108
+ z-index: 999;
109
+ white-space: nowrap;
110
+ position: none;
111
+ left: 0;
112
+ top: 0;
113
+ visibility: hidden;
114
+ }
115
+ .rc-select-multiple .rc-select-selector .rc-select-selection-search-input {
116
+ border: none;
117
+ outline: none;
118
+ background: rgba(255, 0, 0, 0.2);
119
+ width: 100%;
120
+ }
121
+ .rc-select-allow-clear.rc-select-multiple .rc-select-selector {
122
+ padding-right: 20px;
123
+ }
124
+ .rc-select-allow-clear .rc-select-clear {
125
+ position: absolute;
126
+ right: 20px;
127
+ top: 0;
128
+ }
129
+ .rc-select-show-arrow.rc-select-multiple .rc-select-selector {
130
+ padding-right: 20px;
131
+ }
132
+ .rc-select-show-arrow .rc-select-arrow {
133
+ pointer-events: none;
134
+ position: absolute;
135
+ right: 5px;
136
+ top: 0;
137
+ }
138
+ .rc-select-show-arrow .rc-select-arrow-icon::after {
139
+ content: '';
140
+ border: 5px solid transparent;
141
+ width: 0;
142
+ height: 0;
143
+ display: inline-block;
144
+ border-top-color: #999;
145
+ transform: translateY(5px);
146
+ }
147
+ .rc-select-focused .rc-select-selector {
148
+ border-color: blue !important;
149
+ }
150
+ .rc-select-dropdown {
151
+ border: 1px solid green;
152
+ min-height: 100px;
153
+ position: absolute;
154
+ background: #fff;
155
+ }
156
+ .rc-select-dropdown-hidden {
157
+ display: none;
158
+ }
159
+ .rc-select-item {
160
+ font-size: 16px;
161
+ line-height: 1.5;
162
+ padding: 4px 16px;
163
+ }
164
+ .rc-select-item-group {
165
+ color: #999;
166
+ font-weight: bold;
167
+ font-size: 80%;
168
+ }
169
+ .rc-select-item-option {
170
+ position: relative;
171
+ }
172
+ .rc-select-item-option-grouped {
173
+ padding-left: 24px;
174
+ }
175
+ .rc-select-item-option .rc-select-item-option-state {
176
+ position: absolute;
177
+ right: 0;
178
+ top: 4px;
179
+ pointer-events: none;
180
+ }
181
+ .rc-select-item-option-active {
182
+ background: #ddd;
183
+ }
184
+ .rc-select-item-option-disabled {
185
+ color: #999;
186
+ }
187
+ .rc-select-item-empty {
188
+ text-align: center;
189
+ color: #999;
190
+ }
191
+ .rc-select-selection__choice-zoom {
192
+ transition: all 0.3s;
193
+ }
194
+ .rc-select-selection__choice-zoom-appear {
195
+ opacity: 0;
196
+ transform: scale(0.5);
197
+ }
198
+ .rc-select-selection__choice-zoom-appear.rc-select-selection__choice-zoom-appear-active {
199
+ opacity: 1;
200
+ transform: scale(1);
201
+ }
202
+ .rc-select-selection__choice-zoom-leave {
203
+ opacity: 1;
204
+ transform: scale(1);
205
+ }
206
+ .rc-select-selection__choice-zoom-leave.rc-select-selection__choice-zoom-leave-active {
207
+ opacity: 0;
208
+ transform: scale(0.5);
209
+ }
210
+ .rc-select-dropdown-slide-up-enter,
211
+ .rc-select-dropdown-slide-up-appear {
212
+ animation-duration: 0.3s;
213
+ animation-fill-mode: both;
214
+ transform-origin: 0 0;
215
+ opacity: 0;
216
+ animation-timing-function: cubic-bezier(0.08, 0.82, 0.17, 1);
217
+ animation-play-state: paused;
218
+ }
219
+ .rc-select-dropdown-slide-up-leave {
220
+ animation-duration: 0.3s;
221
+ animation-fill-mode: both;
222
+ transform-origin: 0 0;
223
+ opacity: 1;
224
+ animation-timing-function: cubic-bezier(0.6, 0.04, 0.98, 0.34);
225
+ animation-play-state: paused;
226
+ }
227
+ .rc-select-dropdown-slide-up-enter.rc-select-dropdown-slide-up-enter-active.rc-select-dropdown-placement-bottomLeft,
228
+ .rc-select-dropdown-slide-up-appear.rc-select-dropdown-slide-up-appear-active.rc-select-dropdown-placement-bottomLeft,
229
+ .rc-select-dropdown-slide-up-enter.rc-select-dropdown-slide-up-enter-active.rc-select-dropdown-placement-bottomRight,
230
+ .rc-select-dropdown-slide-up-appear.rc-select-dropdown-slide-up-appear-active.rc-select-dropdown-placement-bottomRight {
231
+ animation-name: rcSelectDropdownSlideUpIn;
232
+ animation-play-state: running;
233
+ }
234
+ .rc-select-dropdown-slide-up-leave.rc-select-dropdown-slide-up-leave-active.rc-select-dropdown-placement-bottomLeft,
235
+ .rc-select-dropdown-slide-up-leave.rc-select-dropdown-slide-up-leave-active.rc-select-dropdown-placement-bottomRight {
236
+ animation-name: rcSelectDropdownSlideUpOut;
237
+ animation-play-state: running;
238
+ }
239
+ .rc-select-dropdown-slide-up-enter.rc-select-dropdown-slide-up-enter-active.rc-select-dropdown-placement-topLeft,
240
+ .rc-select-dropdown-slide-up-appear.rc-select-dropdown-slide-up-appear-active.rc-select-dropdown-placement-topLeft,
241
+ .rc-select-dropdown-slide-up-enter.rc-select-dropdown-slide-up-enter-active.rc-select-dropdown-placement-topRight,
242
+ .rc-select-dropdown-slide-up-appear.rc-select-dropdown-slide-up-appear-active.rc-select-dropdown-placement-topRight {
243
+ animation-name: rcSelectDropdownSlideDownIn;
244
+ animation-play-state: running;
245
+ }
246
+ .rc-select-dropdown-slide-up-leave.rc-select-dropdown-slide-up-leave-active.rc-select-dropdown-placement-topLeft,
247
+ .rc-select-dropdown-slide-up-leave.rc-select-dropdown-slide-up-leave-active.rc-select-dropdown-placement-topRight {
248
+ animation-name: rcSelectDropdownSlideDownOut;
249
+ animation-play-state: running;
250
+ }
251
+ @keyframes rcSelectDropdownSlideUpIn {
252
+ 0% {
253
+ opacity: 0;
254
+ transform-origin: 0% 0%;
255
+ transform: scaleY(0);
256
+ }
257
+ 100% {
258
+ opacity: 1;
259
+ transform-origin: 0% 0%;
260
+ transform: scaleY(1);
261
+ }
262
+ }
263
+ @keyframes rcSelectDropdownSlideUpOut {
264
+ 0% {
265
+ opacity: 1;
266
+ transform-origin: 0% 0%;
267
+ transform: scaleY(1);
268
+ }
269
+ 100% {
270
+ opacity: 0;
271
+ transform-origin: 0% 0%;
272
+ transform: scaleY(0);
273
+ }
274
+ }
275
+ @keyframes rcSelectDropdownSlideDownIn {
276
+ 0% {
277
+ transform: scaleY(0);
278
+ transform-origin: 100% 100%;
279
+ opacity: 0;
280
+ }
281
+ 100% {
282
+ transform: scaleY(1);
283
+ transform-origin: 100% 100%;
284
+ opacity: 1;
285
+ }
286
+ }
287
+ @keyframes rcSelectDropdownSlideDownOut {
288
+ 0% {
289
+ transform: scaleY(1);
290
+ transform-origin: 100% 100%;
291
+ opacity: 1;
292
+ }
293
+ 100% {
294
+ transform: scaleY(0);
295
+ transform-origin: 100% 100%;
296
+ opacity: 0;
297
+ }
298
+ }
299
+ @keyframes rcSelectLoadingIcon {
300
+ 0% {
301
+ transform: rotate(0);
302
+ }
303
+ 100% {
304
+ transform: rotate(360deg);
305
+ }
306
+ }