@alfalab/core-components-select 10.3.0 → 10.4.3
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.
- package/CHANGELOG.md +39 -0
- package/dist/Component.d.ts +1 -1
- package/dist/Component.js +1 -1
- package/dist/components/arrow/Component.js +1 -1
- package/dist/components/arrow/index.css +3 -3
- package/dist/components/base-select/Component.js +24 -23
- package/dist/components/base-select/index.css +7 -7
- package/dist/components/base-select/index.js +1 -1
- package/dist/components/checkmark/Component.js +2 -2
- package/dist/components/checkmark/index.css +7 -7
- package/dist/components/field/Component.d.ts +1 -1
- package/dist/components/field/Component.js +3 -3
- package/dist/components/field/index.css +9 -9
- package/dist/components/field/index.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/native-select/Component.js +1 -1
- package/dist/components/native-select/index.js +1 -1
- package/dist/components/optgroup/Component.js +1 -1
- package/dist/components/optgroup/index.css +6 -6
- package/dist/components/option/Component.js +2 -2
- package/dist/components/option/index.css +20 -20
- package/dist/components/option/index.js +1 -1
- package/dist/components/options-list/Component.js +13 -8
- package/dist/components/options-list/index.css +9 -5
- package/dist/components/options-list/index.js +1 -0
- package/dist/components/virtual-options-list/Component.d.ts +1 -1
- package/dist/components/virtual-options-list/Component.js +22 -18
- package/dist/components/virtual-options-list/index.css +15 -12
- package/dist/components/virtual-options-list/index.js +1 -0
- package/dist/cssm/Component.d.ts +1 -1
- package/dist/cssm/components/base-select/Component.js +22 -21
- package/dist/cssm/components/checkmark/Component.js +1 -1
- package/dist/cssm/components/field/Component.d.ts +1 -1
- package/dist/cssm/components/field/Component.js +1 -1
- package/dist/cssm/components/options-list/Component.js +12 -7
- package/dist/cssm/components/options-list/index.js +1 -0
- package/dist/cssm/components/options-list/index.module.css +4 -0
- package/dist/cssm/components/virtual-options-list/Component.d.ts +1 -1
- package/dist/cssm/components/virtual-options-list/Component.js +21 -17
- package/dist/cssm/components/virtual-options-list/index.js +1 -0
- package/dist/cssm/components/virtual-options-list/index.module.css +4 -1
- package/dist/cssm/hook-3b9bd559.d.ts +12 -0
- package/dist/cssm/hook-3b9bd559.js +147 -0
- package/dist/cssm/hook-f5b8fe4f.d.ts +61 -0
- package/dist/cssm/index.js +7 -1
- package/dist/cssm/intersection-observer-8c55e13a.d.ts +1 -0
- package/dist/cssm/intersection-observer-8c55e13a.js +893 -0
- package/dist/cssm/presets/index.d.ts +1 -0
- package/dist/cssm/presets/index.js +29 -1
- package/dist/cssm/presets/useLazyLoading/hook.js +1 -892
- package/dist/cssm/presets/useSelectWithApply/hook.d.ts +0 -0
- package/dist/cssm/presets/useSelectWithApply/hook.js +46 -0
- package/dist/cssm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +0 -0
- package/dist/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +45 -0
- package/dist/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -0
- package/dist/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +45 -0
- package/dist/cssm/presets/useSelectWithApply/options-list-with-apply/index.module.css +38 -0
- package/dist/cssm/typings.d.ts +39 -6
- package/dist/esm/Component.d.ts +1 -1
- package/dist/esm/Component.js +1 -1
- package/dist/esm/components/arrow/Component.js +1 -1
- package/dist/esm/components/arrow/index.css +3 -3
- package/dist/esm/components/base-select/Component.js +24 -23
- package/dist/esm/components/base-select/index.css +7 -7
- package/dist/esm/components/base-select/index.js +1 -1
- package/dist/esm/components/checkmark/Component.js +2 -2
- package/dist/esm/components/checkmark/index.css +7 -7
- package/dist/esm/components/field/Component.d.ts +1 -1
- package/dist/esm/components/field/Component.js +3 -3
- package/dist/esm/components/field/index.css +9 -9
- package/dist/esm/components/field/index.js +1 -1
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/native-select/Component.js +1 -1
- package/dist/esm/components/native-select/index.js +1 -1
- package/dist/esm/components/optgroup/Component.js +1 -1
- package/dist/esm/components/optgroup/index.css +6 -6
- package/dist/esm/components/option/Component.js +2 -2
- package/dist/esm/components/option/index.css +20 -20
- package/dist/esm/components/option/index.js +1 -1
- package/dist/esm/components/options-list/Component.js +14 -9
- package/dist/esm/components/options-list/index.css +9 -5
- package/dist/esm/components/options-list/index.js +1 -0
- package/dist/esm/components/virtual-options-list/Component.d.ts +1 -1
- package/dist/esm/components/virtual-options-list/Component.js +22 -18
- package/dist/esm/components/virtual-options-list/index.css +15 -12
- package/dist/esm/components/virtual-options-list/index.js +1 -0
- package/dist/esm/hook-ad760b61.d.ts +12 -0
- package/dist/esm/hook-ad760b61.js +131 -0
- package/dist/esm/hook-f5b8fe4f.d.ts +61 -0
- package/dist/esm/index.js +4 -1
- package/dist/esm/intersection-observer-e5cee21e.d.ts +1 -0
- package/dist/esm/intersection-observer-e5cee21e.js +891 -0
- package/dist/esm/presets/index.d.ts +1 -0
- package/dist/esm/presets/index.js +20 -1
- package/dist/esm/presets/useLazyLoading/hook.js +3 -894
- package/dist/esm/presets/useLazyLoading/index.css +2 -2
- package/dist/esm/presets/useSelectWithApply/hook.d.ts +0 -0
- package/dist/esm/presets/useSelectWithApply/hook.js +26 -0
- package/dist/esm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +0 -0
- package/dist/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +26 -0
- package/dist/esm/presets/useSelectWithApply/options-list-with-apply/index.css +39 -0
- package/dist/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -0
- package/dist/esm/presets/useSelectWithApply/options-list-with-apply/index.js +26 -0
- package/dist/esm/presets/useSelectWithLoading/hook.js +2 -2
- package/dist/esm/presets/useSelectWithLoading/index.css +2 -2
- package/dist/esm/{tslib.es6-5a8a0ede.d.ts → tslib.es6-877b9695.d.ts} +0 -0
- package/dist/esm/{tslib.es6-5a8a0ede.js → tslib.es6-877b9695.js} +0 -0
- package/dist/esm/typings.d.ts +39 -6
- package/dist/hook-b5dec5da.d.ts +12 -0
- package/dist/hook-b5dec5da.js +140 -0
- package/dist/hook-f5b8fe4f.d.ts +61 -0
- package/dist/index.js +6 -1
- package/dist/intersection-observer-cb877b82.d.ts +1 -0
- package/dist/intersection-observer-cb877b82.js +893 -0
- package/dist/modern/Component.d.ts +1 -1
- package/dist/modern/components/arrow/Component.js +1 -1
- package/dist/modern/components/arrow/index.css +3 -3
- package/dist/modern/components/base-select/Component.js +18 -15
- package/dist/modern/components/base-select/index.css +7 -7
- package/dist/modern/components/checkmark/Component.js +2 -2
- package/dist/modern/components/checkmark/index.css +7 -7
- package/dist/modern/components/field/Component.d.ts +1 -1
- package/dist/modern/components/field/Component.js +2 -2
- package/dist/modern/components/field/index.css +9 -9
- package/dist/modern/components/optgroup/Component.js +1 -1
- package/dist/modern/components/optgroup/index.css +6 -6
- package/dist/modern/components/option/Component.js +1 -1
- package/dist/modern/components/option/index.css +20 -20
- package/dist/modern/components/options-list/Component.js +11 -7
- package/dist/modern/components/options-list/index.css +9 -5
- package/dist/modern/components/virtual-options-list/Component.d.ts +1 -1
- package/dist/modern/components/virtual-options-list/Component.js +20 -17
- package/dist/modern/components/virtual-options-list/index.css +15 -12
- package/dist/modern/hook-2c7fd2b8.d.ts +12 -0
- package/dist/modern/hook-2c7fd2b8.js +132 -0
- package/dist/modern/hook-f5b8fe4f.d.ts +61 -0
- package/dist/modern/index.js +3 -0
- package/dist/modern/intersection-observer-e5cee21e.d.ts +1 -0
- package/dist/modern/intersection-observer-e5cee21e.js +891 -0
- package/dist/modern/presets/index.d.ts +1 -0
- package/dist/modern/presets/index.js +19 -0
- package/dist/modern/presets/useLazyLoading/hook.js +2 -893
- package/dist/modern/presets/useLazyLoading/index.css +2 -2
- package/dist/modern/presets/useSelectWithApply/hook.d.ts +0 -0
- package/dist/modern/presets/useSelectWithApply/hook.js +25 -0
- package/dist/modern/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +0 -0
- package/dist/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +25 -0
- package/dist/modern/presets/useSelectWithApply/options-list-with-apply/index.css +39 -0
- package/dist/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -0
- package/dist/modern/presets/useSelectWithApply/options-list-with-apply/index.js +25 -0
- package/dist/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/dist/modern/presets/useSelectWithLoading/index.css +2 -2
- package/dist/modern/typings.d.ts +39 -6
- package/dist/presets/index.d.ts +1 -0
- package/dist/presets/index.js +22 -1
- package/dist/presets/useLazyLoading/hook.js +3 -894
- package/dist/presets/useLazyLoading/index.css +2 -2
- package/dist/presets/useSelectWithApply/hook.d.ts +0 -0
- package/dist/presets/useSelectWithApply/hook.js +35 -0
- package/dist/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +0 -0
- package/dist/presets/useSelectWithApply/options-list-with-apply/Component.js +34 -0
- package/dist/presets/useSelectWithApply/options-list-with-apply/index.css +39 -0
- package/dist/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -0
- package/dist/presets/useSelectWithApply/options-list-with-apply/index.js +34 -0
- package/dist/presets/useSelectWithLoading/hook.js +2 -2
- package/dist/presets/useSelectWithLoading/index.css +2 -2
- package/dist/{tslib.es6-f6070e97.d.ts → tslib.es6-4db16fbd.d.ts} +0 -0
- package/dist/{tslib.es6-f6070e97.js → tslib.es6-4db16fbd.js} +0 -0
- package/dist/typings.d.ts +39 -6
- package/package.json +4 -3
|
@@ -82,7 +82,7 @@ type SelectProps = Omit<BaseSelectProps, 'fieldProps'> & {
|
|
|
82
82
|
*/
|
|
83
83
|
fieldProps?: FormControlProps & Record<string, unknown>;
|
|
84
84
|
};
|
|
85
|
-
declare const Select: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "visibleOptions" | "Arrow" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "nativeSelect" | "defaultOpen" | "popoverPosition" | "optionsListWidth" | "optionsSize" | "optionsListProps" | "optionProps" | "onOpen" | "Field" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
|
|
85
|
+
declare const Select: React.ForwardRefExoticComponent<Pick<BaseSelectProps, "block" | "size" | "className" | "fieldClassName" | "disabled" | "error" | "hint" | "label" | "dataTestId" | "id" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "onScroll" | "preventFlip" | "popperClassName" | "open" | "name" | "options" | "multiple" | "selected" | "valueRenderer" | "Optgroup" | "visibleOptions" | "Arrow" | "Option" | "optionsListClassName" | "optionClassName" | "autocomplete" | "allowUnselect" | "closeOnSelect" | "circularNavigation" | "nativeSelect" | "defaultOpen" | "popoverPosition" | "optionsListWidth" | "optionsSize" | "optionsListProps" | "optionProps" | "onOpen" | "Field" | "OptionsList" | "updatePopover" | "zIndexPopover" | "showEmptyOptionsList"> & {
|
|
86
86
|
/**
|
|
87
87
|
* Пропсы, которые будут прокинуты в компонент поля
|
|
88
88
|
*/
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
4
|
|
|
5
|
-
var styles = {"arrow":"
|
|
5
|
+
var styles = {"arrow":"select__arrow_fu5sg","open":"select__open_fu5sg"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Arrow = ({ open, className }) => (React.createElement(ChevronDownMIcon, { className: cn(styles.arrow, className, { [styles.open]: open }) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1as7r */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-primary: #0b1f35;
|
|
4
4
|
}
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
26
|
}
|
|
27
|
-
.
|
|
27
|
+
.select__arrow_fu5sg {
|
|
28
28
|
display: block;
|
|
29
29
|
width: 24px;
|
|
30
30
|
height: 24px;
|
|
@@ -32,6 +32,6 @@
|
|
|
32
32
|
|
|
33
33
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.select__open_fu5sg {
|
|
36
36
|
transform: var(--arrow-transform);
|
|
37
37
|
}
|
|
@@ -12,13 +12,14 @@ const getDataTestId = (dataTestId, element) => {
|
|
|
12
12
|
return dataTestId ? `${dataTestId}${elementPart}` : undefined;
|
|
13
13
|
};
|
|
14
14
|
|
|
15
|
-
var styles = {"component":"
|
|
15
|
+
var styles = {"component":"select__component_unytx","popoverInner":"select__popoverInner_unytx","optionsList":"select__optionsList_unytx","nativeSelect":"select__nativeSelect_unytx","block":"select__block_unytx"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
|
-
const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsListClassName, optionClassName, options, autocomplete = false, multiple = false, allowUnselect = false, disabled = false, closeOnSelect = !multiple, circularNavigation = false, nativeSelect = false, defaultOpen = false, open: openProp, popoverPosition = 'bottom-start', preventFlip = true, optionsListWidth = 'content', name, id, selected, size = 's', optionsSize = size, error, hint, block, label, placeholder, fieldProps = {}, optionsListProps = {}, optionProps = {}, valueRenderer, onChange, onOpen, onFocus, onBlur, onScroll, Arrow, Field = () => null, OptionsList = () => null, Optgroup = () => null, Option = () => null, updatePopover, zIndexPopover, showEmptyOptionsList = false, visibleOptions, }, ref) => {
|
|
18
|
+
const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsListClassName, optionClassName, popperClassName, options, autocomplete = false, multiple = false, allowUnselect = false, disabled = false, closeOnSelect = !multiple, circularNavigation = false, nativeSelect = false, defaultOpen = false, open: openProp, popoverPosition = 'bottom-start', preventFlip = true, optionsListWidth = 'content', name, id, selected, size = 's', optionsSize = size, error, hint, block, label, placeholder, fieldProps = {}, optionsListProps = {}, optionProps = {}, valueRenderer, onChange, onOpen, onFocus, onBlur, onScroll, Arrow, Field = () => null, OptionsList = () => null, Optgroup = () => null, Option = () => null, updatePopover, zIndexPopover, showEmptyOptionsList = false, visibleOptions, }, ref) => {
|
|
19
19
|
const rootRef = useRef(null);
|
|
20
20
|
const fieldRef = useRef(null);
|
|
21
21
|
const listRef = useRef(null);
|
|
22
|
+
const initiatorRef = useRef(null);
|
|
22
23
|
const itemToString = (option) => (option ? option.key : '');
|
|
23
24
|
const { flatOptions, selectedOptions } = useMemo(() => processOptions(options, selected), [
|
|
24
25
|
options,
|
|
@@ -32,8 +33,10 @@ const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsL
|
|
|
32
33
|
onChange({
|
|
33
34
|
selectedMultiple: selectedItems,
|
|
34
35
|
selected: selectedItems.length ? selectedItems[0] : null,
|
|
36
|
+
initiator: initiatorRef.current,
|
|
35
37
|
name,
|
|
36
38
|
});
|
|
39
|
+
initiatorRef.current = null;
|
|
37
40
|
}
|
|
38
41
|
},
|
|
39
42
|
stateReducer: (state, actionAndChanges) => {
|
|
@@ -78,6 +81,7 @@ const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsL
|
|
|
78
81
|
switch (type) {
|
|
79
82
|
case useCombobox.stateChangeTypes.InputKeyDownEnter:
|
|
80
83
|
case useCombobox.stateChangeTypes.ItemClick:
|
|
84
|
+
initiatorRef.current = selectedItem;
|
|
81
85
|
if (selectedItem && !selectedItem.disabled) {
|
|
82
86
|
const alreadySelected = selectedItems.includes(selectedItem);
|
|
83
87
|
const allowRemove = allowUnselect || (multiple && selectedItems.length > 1);
|
|
@@ -125,14 +129,15 @@ const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsL
|
|
|
125
129
|
};
|
|
126
130
|
const handleFieldKeyDown = (event) => {
|
|
127
131
|
inputProps.onKeyDown(event);
|
|
128
|
-
if (autocomplete && !open && event.key.length === 1) {
|
|
132
|
+
if (autocomplete && !open && (event.key.length === 1 || event.key === 'Backspace')) {
|
|
129
133
|
// Для автокомплита - открываем меню при начале ввода
|
|
130
134
|
openMenu();
|
|
131
135
|
}
|
|
132
136
|
if ([' ', 'Enter'].includes(event.key) &&
|
|
133
137
|
!autocomplete &&
|
|
134
138
|
!nativeSelect &&
|
|
135
|
-
event.target.tagName !== 'INPUT'
|
|
139
|
+
event.target.tagName !== 'INPUT' &&
|
|
140
|
+
event.target.tagName !== 'BUTTON') {
|
|
136
141
|
// Открываем\закрываем меню по нажатию enter или пробела
|
|
137
142
|
event.preventDefault();
|
|
138
143
|
if (!open || highlightedIndex === -1)
|
|
@@ -150,9 +155,8 @@ const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsL
|
|
|
150
155
|
const handleNativeSelectChange = useCallback(event => {
|
|
151
156
|
setSelectedItems([...event.target.options].reduce((acc, option, index) => option.selected ? acc.concat(flatOptions[index]) : acc, []));
|
|
152
157
|
}, [flatOptions, setSelectedItems]);
|
|
153
|
-
const
|
|
158
|
+
const getOptionProps = useCallback((option, index) => ({
|
|
154
159
|
...optionProps,
|
|
155
|
-
...rest,
|
|
156
160
|
className: optionClassName,
|
|
157
161
|
innerProps: getItemProps({
|
|
158
162
|
index,
|
|
@@ -168,16 +172,15 @@ const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsL
|
|
|
168
172
|
highlighted: index === highlightedIndex,
|
|
169
173
|
selected: selectedItems.includes(option),
|
|
170
174
|
dataTestId: getDataTestId(dataTestId, 'option'),
|
|
171
|
-
})
|
|
172
|
-
|
|
173
|
-
optionProps,
|
|
174
|
-
optionClassName,
|
|
175
|
+
}), [
|
|
176
|
+
dataTestId,
|
|
175
177
|
getItemProps,
|
|
178
|
+
highlightedIndex,
|
|
176
179
|
multiple,
|
|
180
|
+
optionClassName,
|
|
181
|
+
optionProps,
|
|
177
182
|
optionsSize,
|
|
178
|
-
highlightedIndex,
|
|
179
183
|
selectedItems,
|
|
180
|
-
dataTestId,
|
|
181
184
|
]);
|
|
182
185
|
useEffect(() => {
|
|
183
186
|
if (defaultOpen)
|
|
@@ -223,7 +226,7 @@ const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsL
|
|
|
223
226
|
className: cn(styles.component, { [styles.block]: block }, className),
|
|
224
227
|
}), { onKeyDown: disabled ? undefined : handleFieldKeyDown, tabIndex: -1, "data-test-id": getDataTestId(dataTestId) }),
|
|
225
228
|
nativeSelect && renderNativeSelect(),
|
|
226
|
-
React.createElement(Field, Object.assign({ selectedMultiple: selectedItems, selected: selectedItems[0], multiple: multiple, open: open, disabled: disabled, size: size, placeholder: placeholder, label: label && React.createElement("span", Object.assign({}, getLabelProps()), label), Arrow: Arrow && React.createElement(Arrow, { open: open }), error: error, hint: hint, valueRenderer: valueRenderer, className: fieldClassName, innerProps: {
|
|
229
|
+
React.createElement(Field, Object.assign({ selectedMultiple: selectedItems, selected: selectedItems[0], setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, multiple: multiple, open: open, disabled: disabled, size: size, placeholder: placeholder, label: label && React.createElement("span", Object.assign({}, getLabelProps()), label), Arrow: Arrow && React.createElement(Arrow, { open: open }), error: error, hint: hint, valueRenderer: valueRenderer, className: fieldClassName, innerProps: {
|
|
227
230
|
onBlur: handleFieldBlur,
|
|
228
231
|
onFocus: disabled ? undefined : handleFieldFocus,
|
|
229
232
|
onClick: disabled ? undefined : handleFieldClick,
|
|
@@ -237,8 +240,8 @@ const BaseSelect = forwardRef(({ dataTestId, className, fieldClassName, optionsL
|
|
|
237
240
|
: undefined,
|
|
238
241
|
}, dataTestId: getDataTestId(dataTestId, 'field') }, fieldProps)),
|
|
239
242
|
name && !nativeSelect && renderValue(),
|
|
240
|
-
!nativeSelect && (React.createElement(Popover, { open: open, withTransition: false, anchorElement: fieldRef.current, position: popoverPosition, preventFlip: preventFlip, popperClassName: styles.popoverInner, update: updatePopover, zIndex: zIndexPopover }, needRenderOptionsList && (React.createElement("div", Object.assign({}, menuProps, { className: cn(optionsListClassName, styles.optionsList) }),
|
|
241
|
-
React.createElement(OptionsList, Object.assign({}, optionsListProps, { flatOptions: flatOptions, highlightedIndex: highlightedIndex, open: open, size: size, options: options, Optgroup: Optgroup, Option:
|
|
243
|
+
!nativeSelect && (React.createElement(Popover, { open: open, withTransition: false, anchorElement: fieldRef.current, position: popoverPosition, preventFlip: preventFlip, popperClassName: cn(styles.popoverInner, popperClassName), update: updatePopover, zIndex: zIndexPopover }, needRenderOptionsList && (React.createElement("div", Object.assign({}, menuProps, { className: cn(optionsListClassName, styles.optionsList) }),
|
|
244
|
+
React.createElement(OptionsList, Object.assign({}, optionsListProps, { flatOptions: flatOptions, highlightedIndex: highlightedIndex, open: open, size: size, options: options, Optgroup: Optgroup, Option: Option, selectedItems: selectedItems, setSelectedItems: setSelectedItems, toggleMenu: toggleMenu, getOptionProps: getOptionProps, visibleOptions: visibleOptions, onScroll: onScroll, dataTestId: getDataTestId(dataTestId, 'options-list') }))))))));
|
|
242
245
|
});
|
|
243
246
|
|
|
244
247
|
export { BaseSelect };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1h4gb */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
|
|
29
29
|
/* optgroup */
|
|
30
30
|
}
|
|
31
|
-
.
|
|
31
|
+
.select__component_unytx {
|
|
32
32
|
width: max-content;
|
|
33
33
|
position: relative;
|
|
34
34
|
outline: 0;
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.select__popoverInner_unytx {
|
|
37
37
|
padding-top: var(--select-options-list-offset);
|
|
38
38
|
padding-bottom: var(--select-options-list-offset);
|
|
39
39
|
box-shadow: none;
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
border-radius: 0;
|
|
43
43
|
position: relative;
|
|
44
44
|
}
|
|
45
|
-
.
|
|
45
|
+
.select__optionsList_unytx {
|
|
46
46
|
padding-top: var(--select-options-list-top-padding);
|
|
47
47
|
padding-bottom: var(--select-options-list-bottom-padding);
|
|
48
48
|
box-shadow: var(--select-options-list-box-shadow);
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
overflow: hidden;
|
|
52
52
|
will-change: transform;
|
|
53
53
|
}
|
|
54
|
-
.
|
|
54
|
+
.select__nativeSelect_unytx {
|
|
55
55
|
opacity: 0;
|
|
56
56
|
overflow: hidden;
|
|
57
57
|
position: absolute;
|
|
@@ -65,12 +65,12 @@
|
|
|
65
65
|
cursor: pointer;
|
|
66
66
|
z-index: 1;
|
|
67
67
|
}
|
|
68
|
-
.
|
|
68
|
+
.select__block_unytx {
|
|
69
69
|
width: 100%;
|
|
70
70
|
}
|
|
71
71
|
/* width: max-content; fix for IE */
|
|
72
72
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
73
|
-
.
|
|
73
|
+
.select__component_unytx {
|
|
74
74
|
float: left;
|
|
75
75
|
clear: left;
|
|
76
76
|
}
|
|
@@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/dist/modern';
|
|
4
4
|
|
|
5
|
-
var styles = {"checkmark":"
|
|
5
|
+
var styles = {"checkmark":"select__checkmark_7yv5y","single":"select__single_7yv5y","selected":"select__selected_7yv5y","before":"select__before_7yv5y","multiple":"select__multiple_7yv5y","after":"select__after_7yv5y"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Checkmark = ({ selected, className, multiple, position = 'before', }) => {
|
|
@@ -13,7 +13,7 @@ const Checkmark = ({ selected, className, multiple, position = 'before', }) => {
|
|
|
13
13
|
[styles.selected]: selected,
|
|
14
14
|
});
|
|
15
15
|
const handleCheckboxClick = useCallback(event => event.stopPropagation(), []);
|
|
16
|
-
return single ? (React.createElement("span", { className: checkmarkClassNames })) : (React.createElement(Checkbox, { checked: selected, className: checkmarkClassNames, size:
|
|
16
|
+
return single ? (React.createElement("span", { className: checkmarkClassNames })) : (React.createElement(Checkbox, { checked: selected, className: checkmarkClassNames, size: 'm', onClick: handleCheckboxClick }));
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
export { Checkmark };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: l2pio */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-graphic-primary: #0b1f35;
|
|
4
4
|
}
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
|
|
36
36
|
/* optgroup */
|
|
37
37
|
}
|
|
38
|
-
.
|
|
38
|
+
.select__checkmark_7yv5y {
|
|
39
39
|
flex-shrink: 0;
|
|
40
40
|
margin: var(--select-checkmark-margin);
|
|
41
41
|
}
|
|
42
|
-
.
|
|
42
|
+
.select__single_7yv5y {
|
|
43
43
|
display: flex;
|
|
44
44
|
align-items: center;
|
|
45
45
|
justify-content: center;
|
|
@@ -50,15 +50,15 @@
|
|
|
50
50
|
width: var(--select-checkmark-size);
|
|
51
51
|
height: var(--select-checkmark-size)
|
|
52
52
|
}
|
|
53
|
-
.
|
|
53
|
+
.select__single_7yv5y.select__selected_7yv5y {
|
|
54
54
|
opacity: 1;
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.select__before_7yv5y {
|
|
57
57
|
display: var(--select-checkmark-before-display)
|
|
58
58
|
}
|
|
59
|
-
.
|
|
59
|
+
.select__before_7yv5y.select__multiple_7yv5y {
|
|
60
60
|
margin-right: var(--gap-s);
|
|
61
61
|
}
|
|
62
|
-
.
|
|
62
|
+
.select__after_7yv5y {
|
|
63
63
|
display: var(--select-checkmark-after-display);
|
|
64
64
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { FieldProps as BaseFieldProps } from "../../typings";
|
|
4
|
-
declare const Field: ({ size, open, multiple, error, hint, disabled, label, placeholder, selectedMultiple, selected, rightAddons, valueRenderer, Arrow, innerProps, dataTestId, fieldClassName, ...restProps }: BaseFieldProps & React.HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
declare const Field: ({ size, open, multiple, error, hint, disabled, label, placeholder, selectedMultiple, selected, rightAddons, valueRenderer, setSelectedItems, toggleMenu, Arrow, innerProps, dataTestId, fieldClassName, ...restProps }: BaseFieldProps & React.HTMLAttributes<HTMLDivElement> & {
|
|
5
5
|
block?: boolean | undefined;
|
|
6
6
|
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
7
7
|
colors?: "default" | "inverted" | undefined;
|
|
@@ -4,10 +4,10 @@ import { useFocus } from '@alfalab/hooks';
|
|
|
4
4
|
import { FormControl } from '@alfalab/core-components-form-control/dist/modern';
|
|
5
5
|
import { joinOptions } from '../../utils.js';
|
|
6
6
|
|
|
7
|
-
var styles = {"component":"
|
|
7
|
+
var styles = {"component":"select__component_e0qa0","field":"select__field_e0qa0","disabled":"select__disabled_e0qa0","arrow":"select__arrow_e0qa0","placeholder":"select__placeholder_e0qa0","contentWrapper":"select__contentWrapper_e0qa0","value":"select__value_e0qa0","focusVisible":"select__focusVisible_e0qa0"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
|
-
const Field = ({ size = 'm', open, multiple, error, hint, disabled, label, placeholder, selectedMultiple = [], selected, rightAddons, valueRenderer = joinOptions, Arrow, innerProps, dataTestId, fieldClassName, ...restProps }) => {
|
|
10
|
+
const Field = ({ size = 'm', open, multiple, error, hint, disabled, label, placeholder, selectedMultiple = [], selected, rightAddons, valueRenderer = joinOptions, setSelectedItems, toggleMenu, Arrow, innerProps, dataTestId, fieldClassName, ...restProps }) => {
|
|
11
11
|
const [focused, setFocused] = useState(false);
|
|
12
12
|
const wrapperRef = useRef(null);
|
|
13
13
|
const [focusVisible] = useFocus(wrapperRef, 'keyboard');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1bkdh */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-text-secondary: #546272;
|
|
@@ -26,24 +26,24 @@
|
|
|
26
26
|
|
|
27
27
|
/* optgroup */
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.select__component_e0qa0 {
|
|
30
30
|
width: 100%;
|
|
31
31
|
outline: none;
|
|
32
32
|
}
|
|
33
|
-
.
|
|
33
|
+
.select__field_e0qa0:not(.select__disabled_e0qa0) {
|
|
34
34
|
cursor: pointer
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.select__field_e0qa0:not(.select__disabled_e0qa0):hover .select__arrow_e0qa0 {
|
|
37
37
|
opacity: var(--select-arrow-hover-opacity);
|
|
38
38
|
}
|
|
39
|
-
.
|
|
39
|
+
.select__disabled_e0qa0 {
|
|
40
40
|
cursor: var(--disabled-cursor);
|
|
41
41
|
}
|
|
42
42
|
/* TODO: Заюзать переменные из инпута */
|
|
43
|
-
.
|
|
43
|
+
.select__placeholder_e0qa0 {
|
|
44
44
|
color: var(--color-light-text-secondary);
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.select__contentWrapper_e0qa0 {
|
|
47
47
|
font-size: 16px;
|
|
48
48
|
line-height: 20px;
|
|
49
49
|
font-weight: 400;
|
|
@@ -53,12 +53,12 @@
|
|
|
53
53
|
overflow: hidden;
|
|
54
54
|
width: 100%;
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.select__value_e0qa0 {
|
|
57
57
|
overflow: hidden;
|
|
58
58
|
text-overflow: ellipsis;
|
|
59
59
|
text-align: left;
|
|
60
60
|
}
|
|
61
|
-
.
|
|
61
|
+
.select__focusVisible_e0qa0 {
|
|
62
62
|
outline: 2px solid var(--focus-color);
|
|
63
63
|
outline-offset: 2px;
|
|
64
64
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
var styles = {"optgroup":"
|
|
4
|
+
var styles = {"optgroup":"select__optgroup_18hzg","label":"select__label_18hzg","l":"select__l_18hzg","xl":"select__xl_18hzg"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Optgroup = ({ children, label, size = 's' }) => (React.createElement(React.Fragment, null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 13ial */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-text-secondary: #546272;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
--select-optgroup-l-left-padding: var(--gap-m);
|
|
34
34
|
--select-optgroup-l-right-padding: var(--gap-m);
|
|
35
35
|
}
|
|
36
|
-
.
|
|
36
|
+
.select__optgroup_18hzg {
|
|
37
37
|
position: relative;
|
|
38
38
|
display: flex;
|
|
39
39
|
align-items: center;
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
background: var(--select-optgroup-background);
|
|
44
44
|
min-height: 40px
|
|
45
45
|
}
|
|
46
|
-
.
|
|
46
|
+
.select__optgroup_18hzg + *[role='option']:before {
|
|
47
47
|
display: none;
|
|
48
48
|
}
|
|
49
|
-
.
|
|
49
|
+
.select__label_18hzg {
|
|
50
50
|
font-size: 12px;
|
|
51
51
|
line-height: 16px;
|
|
52
52
|
font-weight: 500;
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
display: block;
|
|
57
57
|
color: var(--select-optgroup-color);
|
|
58
58
|
}
|
|
59
|
-
.
|
|
60
|
-
.
|
|
59
|
+
.select__l_18hzg,
|
|
60
|
+
.select__xl_18hzg {
|
|
61
61
|
padding-left: var(--select-optgroup-l-left-padding);
|
|
62
62
|
padding-right: var(--select-optgroup-l-right-padding);
|
|
63
63
|
}
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import '@alfalab/core-components-checkbox/dist/modern';
|
|
4
4
|
import { Checkmark } from '../checkmark/Component.js';
|
|
5
5
|
|
|
6
|
-
var styles = {"option":"
|
|
6
|
+
var styles = {"option":"select__option_1x0yw","disabled":"select__disabled_1x0yw","s":"select__s_1x0yw","m":"select__m_1x0yw","l":"select__l_1x0yw","xl":"select__xl_1x0yw","selected":"select__selected_1x0yw","highlighted":"select__highlighted_1x0yw","content":"select__content_1x0yw","textContent":"select__textContent_1x0yw"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const Option = ({ size = 's', className, option, children, selected, highlighted, disabled, multiple, Checkmark: Checkmark$1 = Checkmark, innerProps, dataTestId, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: np7ks */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-bg-secondary: #f3f4f5;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
|
|
54
54
|
/* optgroup */
|
|
55
55
|
}
|
|
56
|
-
.
|
|
56
|
+
.select__option_1x0yw {
|
|
57
57
|
font-size: 16px;
|
|
58
58
|
line-height: 20px;
|
|
59
59
|
font-weight: 400;
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
position: relative;
|
|
70
70
|
cursor: pointer
|
|
71
71
|
}
|
|
72
|
-
.
|
|
72
|
+
.select__option_1x0yw:not(.select__disabled_1x0yw):active {
|
|
73
73
|
background: var(--select-option-active-background);
|
|
74
74
|
color: var(--select-option-active-color);
|
|
75
75
|
}
|
|
76
|
-
.
|
|
76
|
+
.select__option_1x0yw:before {
|
|
77
77
|
content: '';
|
|
78
78
|
position: absolute;
|
|
79
79
|
left: var(--select-option-left-padding);
|
|
@@ -84,60 +84,60 @@
|
|
|
84
84
|
display: var(--select-option-divider-display);
|
|
85
85
|
transition: opacity 0.2s ease;
|
|
86
86
|
}
|
|
87
|
-
.
|
|
87
|
+
.select__option_1x0yw:first-child:before {
|
|
88
88
|
display: none;
|
|
89
89
|
}
|
|
90
|
-
.
|
|
90
|
+
.select__s_1x0yw {
|
|
91
91
|
min-height: var(--size-s-height);
|
|
92
92
|
}
|
|
93
|
-
.
|
|
93
|
+
.select__m_1x0yw {
|
|
94
94
|
min-height: var(--size-m-height);
|
|
95
95
|
}
|
|
96
|
-
.
|
|
96
|
+
.select__l_1x0yw {
|
|
97
97
|
min-height: var(--size-l-height);
|
|
98
98
|
}
|
|
99
|
-
.
|
|
99
|
+
.select__xl_1x0yw {
|
|
100
100
|
min-height: var(--size-xl-height);
|
|
101
101
|
}
|
|
102
|
-
.
|
|
103
|
-
.
|
|
102
|
+
.select__l_1x0yw,
|
|
103
|
+
.select__xl_1x0yw {
|
|
104
104
|
padding-left: var(--select-option-l-left-padding);
|
|
105
105
|
padding-right: var(--select-option-l-right-padding)
|
|
106
106
|
}
|
|
107
|
-
.
|
|
107
|
+
.select__l_1x0yw:before, .select__xl_1x0yw:before {
|
|
108
108
|
left: var(--select-option-l-left-padding);
|
|
109
109
|
right: var(--select-option-l-right-padding);
|
|
110
110
|
}
|
|
111
|
-
.
|
|
111
|
+
.select__selected_1x0yw {
|
|
112
112
|
background: var(--select-option-selected-background);
|
|
113
113
|
color: var(--select-option-selected-color);
|
|
114
114
|
cursor: default;
|
|
115
115
|
}
|
|
116
|
-
.
|
|
116
|
+
.select__highlighted_1x0yw {
|
|
117
117
|
background: var(--select-option-hover-background);
|
|
118
118
|
color: var(--select-option-hover-color)
|
|
119
119
|
}
|
|
120
|
-
.
|
|
121
|
-
.
|
|
120
|
+
.select__highlighted_1x0yw:before,
|
|
121
|
+
.select__highlighted_1x0yw + .select__option_1x0yw:before {
|
|
122
122
|
opacity: 0;
|
|
123
123
|
}
|
|
124
|
-
.
|
|
124
|
+
.select__disabled_1x0yw {
|
|
125
125
|
cursor: var(--disabled-cursor);
|
|
126
126
|
background: var(--select-option-disabled-background);
|
|
127
127
|
color: var(--select-option-disabled-color);
|
|
128
128
|
}
|
|
129
|
-
.
|
|
129
|
+
.select__content_1x0yw {
|
|
130
130
|
overflow: hidden;
|
|
131
131
|
text-overflow: ellipsis;
|
|
132
132
|
flex: 1;
|
|
133
133
|
}
|
|
134
|
-
.
|
|
134
|
+
.select__textContent_1x0yw {
|
|
135
135
|
padding-top: var(--gap-s);
|
|
136
136
|
padding-bottom: var(--gap-s);
|
|
137
137
|
}
|
|
138
138
|
/* IE min-height fix */
|
|
139
139
|
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
140
|
-
.
|
|
140
|
+
.select__option_1x0yw:after {
|
|
141
141
|
min-height: inherit;
|
|
142
142
|
font-size: 0;
|
|
143
143
|
content: '';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { forwardRef,
|
|
1
|
+
import React, { forwardRef, useCallback, useRef } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { useVisibleOptions, isGroup } from '../../utils.js';
|
|
4
4
|
import mergeRefs from 'react-merge-refs';
|
|
5
5
|
import { Optgroup } from '../optgroup/Component.js';
|
|
6
6
|
|
|
7
|
-
var styles = {"optionsList":"
|
|
7
|
+
var styles = {"optionsList":"select__optionsList_vh3r8","scrollable":"select__scrollable_vh3r8","emptyPlaceholder":"select__emptyPlaceholder_vh3r8","l":"select__l_vh3r8","xl":"select__xl_vh3r8"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const createCounter = () => {
|
|
@@ -12,10 +12,11 @@ const createCounter = () => {
|
|
|
12
12
|
// eslint-disable-next-line no-plusplus
|
|
13
13
|
return () => count++;
|
|
14
14
|
};
|
|
15
|
-
const OptionsList = forwardRef(({ size = 's', className, Option, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = 5, onScroll, open, }, ref) => {
|
|
15
|
+
const OptionsList = forwardRef(({ size = 's', className, Option, getOptionProps, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = 5, onScroll, open, header, footer, }, ref) => {
|
|
16
|
+
const renderOption = useCallback((option, index) => (React.createElement(Option, Object.assign({ key: option.key }, getOptionProps(option, index)))), [getOptionProps]);
|
|
16
17
|
const listRef = useRef(null);
|
|
17
18
|
const counter = createCounter();
|
|
18
|
-
const renderGroup = useCallback((group) => (React.createElement(Optgroup$1, { label: group.label, key: group.label, size: size }, group.options.map(option =>
|
|
19
|
+
const renderGroup = useCallback((group) => (React.createElement(Optgroup$1, { label: group.label, key: group.label, size: size }, group.options.map(option => renderOption(option, counter())))), [counter, renderOption, size]);
|
|
19
20
|
useVisibleOptions({
|
|
20
21
|
visibleOptions,
|
|
21
22
|
listRef,
|
|
@@ -25,9 +26,12 @@ const OptionsList = forwardRef(({ size = 's', className, Option, options = [], O
|
|
|
25
26
|
if (options.length === 0 && !emptyPlaceholder) {
|
|
26
27
|
return null;
|
|
27
28
|
}
|
|
28
|
-
return (React.createElement("div", { className: cn(styles.optionsList, styles[size], className), "data-test-id": dataTestId
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
return (React.createElement("div", { className: cn(styles.optionsList, styles[size], className), "data-test-id": dataTestId },
|
|
30
|
+
header,
|
|
31
|
+
React.createElement("div", { className: styles.scrollable, ref: mergeRefs([listRef, ref]), onScroll: onScroll },
|
|
32
|
+
options.map(option => isGroup(option) ? renderGroup(option) : renderOption(option, counter())),
|
|
33
|
+
emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder))),
|
|
34
|
+
footer));
|
|
31
35
|
});
|
|
32
36
|
|
|
33
37
|
export { OptionsList };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: aszhg */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: #546272;
|
|
4
4
|
}
|
|
@@ -26,17 +26,21 @@
|
|
|
26
26
|
|
|
27
27
|
/* optgroup */
|
|
28
28
|
}
|
|
29
|
-
.
|
|
29
|
+
.select__optionsList_vh3r8 {
|
|
30
30
|
overflow: auto;
|
|
31
31
|
width: 100%;
|
|
32
32
|
outline: none;
|
|
33
33
|
box-sizing: border-box;
|
|
34
34
|
}
|
|
35
|
-
.
|
|
35
|
+
.select__scrollable_vh3r8 {
|
|
36
|
+
overflow: auto;
|
|
37
|
+
width: 100%;
|
|
38
|
+
}
|
|
39
|
+
.select__emptyPlaceholder_vh3r8 {
|
|
36
40
|
padding: var(--gap-m) var(--gap-s);
|
|
37
41
|
color: var(--select-options-list-empty-placeholder-color);
|
|
38
42
|
}
|
|
39
|
-
.
|
|
40
|
-
.
|
|
43
|
+
.select__l_vh3r8 .select__emptyPlaceholder_vh3r8,
|
|
44
|
+
.select__xl_vh3r8 .select__emptyPlaceholder_vh3r8 {
|
|
41
45
|
padding: var(--gap-xl) var(--gap-m);
|
|
42
46
|
}
|
|
@@ -6,5 +6,5 @@ type VirtualOptionsList = OptionsListProps & {
|
|
|
6
6
|
*/
|
|
7
7
|
overscan?: number;
|
|
8
8
|
};
|
|
9
|
-
declare const VirtualOptionsList: ({ size, flatOptions, highlightedIndex, className, Option, open, options, overscan, Optgroup, dataTestId, emptyPlaceholder, visibleOptions, onScroll, }: VirtualOptionsList) => JSX.Element;
|
|
9
|
+
declare const VirtualOptionsList: ({ size, flatOptions, highlightedIndex, className, getOptionProps, Option, open, options, overscan, Optgroup, dataTestId, emptyPlaceholder, visibleOptions, onScroll, header, footer, }: VirtualOptionsList) => JSX.Element;
|
|
10
10
|
export { VirtualOptionsList };
|