@alfalab/core-components-select 15.1.6 → 15.2.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.
- package/Component-89f0cb07.d.ts +38 -0
- package/Component.mobile-ebda875c.d.ts +4 -4
- package/Component.mobile-f1f15074.d.ts +4 -4
- package/Component.mobile.js +2 -2
- package/Component.modal.mobile.js +2 -2
- package/Component.responsive.js +1 -1
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +4 -4
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +13 -13
- package/components/base-select/Component.js +7 -4
- package/components/base-select/index.css +11 -11
- package/components/base-select-mobile/Component.js +8 -3
- package/components/base-select-mobile/footer/Component.js +1 -1
- package/components/base-select-mobile/footer/index.css +5 -5
- package/components/base-select-mobile/index.css +17 -18
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/field/Component.js +3 -2
- package/components/field/index.css +12 -12
- package/components/field/index.js +1 -0
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +20 -20
- package/components/options-list/Component.js +5 -4
- package/components/options-list/index.css +9 -9
- package/components/search/Component.d.ts +1 -1
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +5 -4
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/cssm/Component.mobile-ebda875c.d.ts +4 -4
- package/cssm/Component.mobile-f1f15074.d.ts +4 -4
- package/cssm/Component.mobile.js +2 -2
- package/cssm/Component.modal.mobile.js +2 -2
- package/cssm/Component.responsive.js +1 -1
- package/cssm/components/base-select/Component.js +6 -3
- package/cssm/components/base-select-mobile/Component.js +7 -2
- package/cssm/components/base-select-mobile/index.module.css +1 -2
- package/cssm/components/field/Component.js +2 -1
- package/cssm/components/field/index.js +1 -0
- package/cssm/components/options-list/Component.js +4 -3
- package/cssm/components/search/Component.d.ts +1 -1
- package/cssm/components/virtual-options-list/Component.js +4 -3
- package/cssm/desktop-69921c40.d.ts +6 -0
- package/{hook-e2cb53a7.js → cssm/hook-244c8d6e.js} +4 -1
- package/cssm/hook-8abfea97.d.ts +1 -1
- package/cssm/index-ebda875c.d.ts +1 -37
- package/cssm/index.js +1 -1
- package/cssm/mobile.js +1 -1
- package/cssm/presets/index.js +1 -1
- package/cssm/presets/useSelectWithApply/hook.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/cssm/shared.js +1 -1
- package/{esm/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
- package/cssm/typings.d.ts +4 -0
- package/desktop-69921c40.d.ts +6 -0
- package/esm/Component-89f0cb07.d.ts +38 -0
- package/esm/Component.mobile-ebda875c.d.ts +4 -4
- package/esm/Component.mobile-f1f15074.d.ts +4 -4
- package/esm/Component.mobile.js +2 -2
- package/esm/Component.modal.mobile.js +2 -2
- package/esm/Component.responsive.js +1 -1
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +4 -4
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +13 -13
- package/esm/components/base-select/Component.js +7 -4
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select-mobile/Component.js +8 -3
- package/esm/components/base-select-mobile/footer/Component.js +1 -1
- package/esm/components/base-select-mobile/footer/index.css +5 -5
- package/esm/components/base-select-mobile/index.css +17 -18
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/field/Component.js +3 -2
- package/esm/components/field/index.css +12 -12
- package/esm/components/field/index.js +1 -0
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +20 -20
- package/esm/components/options-list/Component.js +5 -4
- package/esm/components/options-list/index.css +9 -9
- package/esm/components/search/Component.d.ts +1 -1
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +5 -4
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/desktop-69921c40.d.ts +6 -0
- package/esm/hook-8abfea97.d.ts +1 -1
- package/esm/{hook-c08bd75b.js → hook-fd09603a.js} +4 -1
- package/esm/index-ebda875c.d.ts +1 -37
- package/esm/index.js +1 -1
- package/esm/mobile.js +1 -1
- package/esm/presets/index.js +1 -1
- package/esm/presets/useSelectWithApply/hook.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared.js +1 -1
- package/{modern/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/esm/typings.d.ts +4 -0
- package/{cssm/hook-d1f5dd40.js → hook-38a2e173.js} +4 -1
- package/hook-8abfea97.d.ts +1 -1
- package/index-ebda875c.d.ts +1 -37
- package/index.js +1 -1
- package/mobile.js +1 -1
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/modern/Component.mobile-ebda875c.d.ts +4 -4
- package/modern/Component.mobile-f1f15074.d.ts +4 -4
- package/modern/Component.mobile.js +2 -2
- package/modern/Component.modal.mobile.js +2 -2
- package/modern/Component.responsive.js +1 -1
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +4 -4
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +13 -13
- package/modern/components/base-select/Component.js +4 -4
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select-mobile/Component.js +5 -3
- package/modern/components/base-select-mobile/footer/Component.js +1 -1
- package/modern/components/base-select-mobile/footer/index.css +5 -5
- package/modern/components/base-select-mobile/index.css +17 -18
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/field/Component.js +3 -2
- package/modern/components/field/index.css +12 -12
- package/modern/components/field/index.js +1 -0
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +20 -20
- package/modern/components/options-list/Component.js +5 -4
- package/modern/components/options-list/index.css +9 -9
- package/modern/components/search/Component.d.ts +1 -1
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +5 -4
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/desktop-69921c40.d.ts +6 -0
- package/modern/hook-8abfea97.d.ts +1 -1
- package/modern/{hook-c17ab103.js → hook-ba0e806d.js} +1 -1
- package/modern/index-ebda875c.d.ts +1 -37
- package/modern/index.js +1 -1
- package/modern/mobile.js +1 -1
- package/modern/presets/index.js +1 -1
- package/modern/presets/useSelectWithApply/hook.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared.js +1 -1
- package/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/modern/typings.d.ts +4 -0
- package/package.json +8 -8
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared.js +1 -1
- package/src/Component.mobile.tsx +2 -0
- package/src/Component.modal.mobile.tsx +2 -0
- package/src/components/base-select/Component.tsx +3 -1
- package/src/components/base-select-mobile/Component.tsx +7 -2
- package/src/components/base-select-mobile/index.module.css +1 -1
- package/src/components/field/Component.tsx +2 -0
- package/src/components/options-list/Component.tsx +9 -1
- package/src/components/virtual-options-list/Component.tsx +12 -1
- package/src/presets/useSelectWithApply/options-list-with-apply/Component.tsx +1 -1
- package/src/typings.ts +5 -0
- package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/typings.d.ts +4 -0
- package/cssm/desktop-63dec22f.d.ts +0 -6
- package/desktop-63dec22f.d.ts +0 -6
- package/esm/desktop-63dec22f.d.ts +0 -6
- package/modern/desktop-63dec22f.d.ts +0 -6
- /package/cssm/{hook-d1f5dd40.d.ts → hook-244c8d6e.d.ts} +0 -0
- /package/esm/{hook-c08bd75b.d.ts → hook-fd09603a.d.ts} +0 -0
- /package/{hook-e2cb53a7.d.ts → hook-38a2e173.d.ts} +0 -0
- /package/modern/{hook-c17ab103.d.ts → hook-ba0e806d.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1cbtc */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-positive: #2fc26e;
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
--select-checkmark-border-radius: var(--border-radius-circle);
|
|
40
40
|
|
|
41
41
|
/* optgroup */
|
|
42
|
-
} .
|
|
42
|
+
} .select__checkmark_18zj3 {
|
|
43
43
|
flex-shrink: 0;
|
|
44
44
|
margin: var(--select-checkmark-margin)
|
|
45
|
-
} .
|
|
45
|
+
} .select__checkmark_18zj3.select__after_18zj3 {
|
|
46
46
|
margin: var(--select-checkmark-margin-after);
|
|
47
|
-
} .
|
|
47
|
+
} .select__single_18zj3 {
|
|
48
48
|
display: flex;
|
|
49
49
|
align-items: center;
|
|
50
50
|
justify-content: center;
|
|
@@ -54,17 +54,17 @@
|
|
|
54
54
|
border-radius: var(--select-checkmark-border-radius);
|
|
55
55
|
width: var(--select-checkmark-size);
|
|
56
56
|
height: var(--select-checkmark-size)
|
|
57
|
-
} .
|
|
57
|
+
} .select__single_18zj3.select__selected_18zj3 {
|
|
58
58
|
opacity: 1;
|
|
59
|
-
} .
|
|
59
|
+
} .select__before_18zj3 {
|
|
60
60
|
display: var(--select-checkmark-before-display)
|
|
61
|
-
} .
|
|
61
|
+
} .select__before_18zj3.select__multiple_18zj3 {
|
|
62
62
|
margin-right: var(--gap-s);
|
|
63
63
|
display: var(--select-checkmark-before-display-multiple);
|
|
64
|
-
} .
|
|
64
|
+
} .select__after_18zj3 {
|
|
65
65
|
display: var(--select-checkmark-after-display)
|
|
66
|
-
} .
|
|
66
|
+
} .select__after_18zj3.select__single_18zj3 {
|
|
67
67
|
display: var(--select-checkmark-after-display-single);
|
|
68
|
-
} .
|
|
68
|
+
} .select__colorIcon_18zj3 {
|
|
69
69
|
color: var(--color-light-graphic-positive);
|
|
70
70
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
4
4
|
|
|
5
|
-
const styles = {"checkmark":"
|
|
5
|
+
const styles = {"checkmark":"select__checkmark_z2bpr","selected":"select__selected_z2bpr","displayIcon":"select__displayIcon_z2bpr","displayBadge":"select__displayBadge_z2bpr"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Checkmark = ({ selected, className }) => (React.createElement("div", { className: cn(styles.checkmark, className, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: r8abf */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
--select-mobile-checkmark-display-badge: none;
|
|
26
26
|
|
|
27
27
|
/* optgroup */
|
|
28
|
-
} .
|
|
28
|
+
} .select__checkmark_z2bpr {
|
|
29
29
|
flex-shrink: 0;
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
width: 24px;
|
|
34
34
|
height: 24px;
|
|
35
35
|
opacity: 0
|
|
36
|
-
} .
|
|
36
|
+
} .select__checkmark_z2bpr:first-child {
|
|
37
37
|
display: none;
|
|
38
|
-
} .
|
|
38
|
+
} .select__checkmark_z2bpr.select__selected_z2bpr {
|
|
39
39
|
opacity: 1;
|
|
40
|
-
} .
|
|
40
|
+
} .select__displayIcon_z2bpr {
|
|
41
41
|
display: var(--select-mobile-checkmark-display-icon);
|
|
42
|
-
} .
|
|
42
|
+
} .select__displayBadge_z2bpr {
|
|
43
43
|
display: var(--select-mobile-checkmark-display-badge);
|
|
44
44
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import React, { useState, useRef, useCallback } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
3
4
|
import { useFocus } from '@alfalab/hooks';
|
|
4
5
|
import { joinOptions } from '../../utils.js';
|
|
5
6
|
|
|
6
|
-
const styles = {"component":"
|
|
7
|
+
const styles = {"component":"select__component_j0mcj","field":"select__field_j0mcj","disabled":"select__disabled_j0mcj","arrow":"select__arrow_j0mcj","placeholder":"select__placeholder_j0mcj","show-placeholder":"select__show-placeholder_j0mcj","focused":"select__focused_j0mcj","contentWrapper":"select__contentWrapper_j0mcj","value":"select__value_j0mcj","focusVisible":"select__focusVisible_j0mcj"};
|
|
7
8
|
require('./index.css')
|
|
8
9
|
|
|
9
10
|
const Field = ({ size = 'm', open, multiple, error, hint, disabled, label, labelView = 'inner', placeholder, selectedMultiple = [], selected, rightAddons, valueRenderer = joinOptions, setSelectedItems, toggleMenu, Arrow, innerProps, dataTestId, fieldClassName, FormControlComponent, ...restProps }) => {
|
|
@@ -16,7 +17,7 @@ const Field = ({ size = 'm', open, multiple, error, hint, disabled, label, label
|
|
|
16
17
|
const filled = Boolean(value);
|
|
17
18
|
const showLabel = !!label || labelView === 'outer';
|
|
18
19
|
const showPlaceholder = !!placeholder && !filled && (open || !label || labelView === 'outer');
|
|
19
|
-
return (React.createElement("div", { className: styles.component, ref: wrapperRef, onFocus: handleFocus, onBlur: handleBlur }, FormControlComponent ? (React.createElement(FormControlComponent, { fieldClassName: cn(styles.field, fieldClassName, {
|
|
20
|
+
return (React.createElement("div", { className: styles.component, ref: wrapperRef, onFocus: handleFocus, onBlur: handleBlur }, FormControlComponent ? (React.createElement(FormControlComponent, { dataTestId: getDataTestId(dataTestId, 'form-control'), fieldClassName: cn(styles.field, fieldClassName, {
|
|
20
21
|
[styles.disabled]: disabled,
|
|
21
22
|
[styles.focusVisible]: focusVisible,
|
|
22
23
|
}), block: true, size: size, focused: focused || open, disabled: disabled, filled: filled || (!!placeholder && open), label: showLabel && label, labelView: labelView, error: error, hint: hint, rightAddons: (Arrow || rightAddons) && (React.createElement(React.Fragment, null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: r4kbg */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -44,22 +44,22 @@
|
|
|
44
44
|
/* checkmark */
|
|
45
45
|
|
|
46
46
|
/* optgroup */
|
|
47
|
-
} .
|
|
47
|
+
} .select__component_j0mcj {
|
|
48
48
|
width: 100%;
|
|
49
49
|
outline: none;
|
|
50
|
-
} .
|
|
50
|
+
} .select__field_j0mcj:not(.select__disabled_j0mcj) {
|
|
51
51
|
cursor: pointer
|
|
52
|
-
} .
|
|
52
|
+
} .select__field_j0mcj:not(.select__disabled_j0mcj):hover .select__arrow_j0mcj {
|
|
53
53
|
opacity: var(--select-arrow-hover-opacity);
|
|
54
|
-
} .
|
|
54
|
+
} .select__disabled_j0mcj {
|
|
55
55
|
cursor: var(--disabled-cursor);
|
|
56
|
-
} .
|
|
56
|
+
} .select__placeholder_j0mcj {
|
|
57
57
|
color: var(--input-placeholder-color);
|
|
58
58
|
transition: color 0.2s ease;
|
|
59
|
-
animation: select__show-
|
|
60
|
-
} .
|
|
59
|
+
animation: select__show-placeholder_j0mcj 0.2s ease
|
|
60
|
+
} .select__placeholder_j0mcj.select__focused_j0mcj {
|
|
61
61
|
color: var(--input-focus-placeholder-color);
|
|
62
|
-
} .
|
|
62
|
+
} .select__contentWrapper_j0mcj {
|
|
63
63
|
font-size: 16px;
|
|
64
64
|
line-height: 20px;
|
|
65
65
|
font-weight: 400;
|
|
@@ -68,14 +68,14 @@
|
|
|
68
68
|
text-overflow: ellipsis;
|
|
69
69
|
overflow: hidden;
|
|
70
70
|
width: 100%;
|
|
71
|
-
} .
|
|
71
|
+
} .select__value_j0mcj {
|
|
72
72
|
overflow: hidden;
|
|
73
73
|
text-overflow: ellipsis;
|
|
74
74
|
text-align: left;
|
|
75
|
-
} .
|
|
75
|
+
} .select__focusVisible_j0mcj {
|
|
76
76
|
outline: 2px solid var(--focus-color);
|
|
77
77
|
outline-offset: 2px;
|
|
78
|
-
} @keyframes select__show-
|
|
78
|
+
} @keyframes select__show-placeholder_j0mcj {
|
|
79
79
|
from {
|
|
80
80
|
opacity: 0;
|
|
81
81
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
const styles = {"optgroup":"
|
|
4
|
+
const styles = {"optgroup":"select__optgroup_7hbj3","label":"select__label_7hbj3","l":"select__l_7hbj3","xl":"select__xl_7hbj3"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Optgroup = ({ children, className, label, size = 's' }) => (React.createElement(React.Fragment, null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: fn21k */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
--select-optgroup-right-padding: var(--gap-s);
|
|
36
36
|
--select-optgroup-l-left-padding: var(--gap-m);
|
|
37
37
|
--select-optgroup-l-right-padding: var(--gap-m);
|
|
38
|
-
} .
|
|
38
|
+
} .select__optgroup_7hbj3 {
|
|
39
39
|
position: relative;
|
|
40
40
|
display: flex;
|
|
41
41
|
align-items: center;
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
background: var(--select-optgroup-background);
|
|
46
46
|
min-height: 40px
|
|
47
|
-
} .
|
|
47
|
+
} .select__optgroup_7hbj3 + *[role='option']:before {
|
|
48
48
|
display: none;
|
|
49
|
-
} .
|
|
49
|
+
} .select__label_7hbj3 {
|
|
50
50
|
font-size: 12px;
|
|
51
51
|
line-height: 16px;
|
|
52
52
|
font-weight: 500;
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
|
|
56
56
|
display: block;
|
|
57
57
|
color: var(--select-optgroup-color);
|
|
58
|
-
} .
|
|
59
|
-
.
|
|
58
|
+
} .select__l_7hbj3,
|
|
59
|
+
.select__xl_7hbj3 {
|
|
60
60
|
padding-left: var(--select-optgroup-l-left-padding);
|
|
61
61
|
padding-right: var(--select-optgroup-l-right-padding);
|
|
62
62
|
}
|
|
@@ -7,7 +7,7 @@ import '@alfalab/core-components-checkbox/modern';
|
|
|
7
7
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
8
8
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
9
9
|
|
|
10
|
-
const styles = {"option":"
|
|
10
|
+
const styles = {"option":"select__option_px0d0","disabled":"select__disabled_px0d0","s":"select__s_px0d0","m":"select__m_px0d0","l":"select__l_px0d0","xl":"select__xl_px0d0","selected":"select__selected_px0d0","highlighted":"select__highlighted_px0d0","content":"select__content_px0d0","textContent":"select__textContent_px0d0"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const Option = ({ size = 's', className, option, children, selected, highlighted, disabled, multiple, mobile, Checkmark: Checkmark$2 = mobile ? Checkmark : Checkmark$1, innerProps, dataTestId, }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: t314y */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff;
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
/* checkmark */
|
|
54
54
|
|
|
55
55
|
/* optgroup */
|
|
56
|
-
} .
|
|
56
|
+
} .select__option_px0d0 {
|
|
57
57
|
font-size: 16px;
|
|
58
58
|
line-height: 20px;
|
|
59
59
|
font-weight: 400;
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
box-sizing: border-box;
|
|
69
69
|
position: relative;
|
|
70
70
|
cursor: pointer
|
|
71
|
-
} .
|
|
71
|
+
} .select__option_px0d0:not(.select__disabled_px0d0):active {
|
|
72
72
|
background: var(--select-option-active-background);
|
|
73
73
|
color: var(--select-option-active-color);
|
|
74
|
-
} .
|
|
74
|
+
} .select__option_px0d0:before {
|
|
75
75
|
content: '';
|
|
76
76
|
position: absolute;
|
|
77
77
|
left: var(--select-option-left-padding);
|
|
@@ -81,46 +81,46 @@
|
|
|
81
81
|
background: var(--select-option-divider-background);
|
|
82
82
|
display: var(--select-option-divider-display);
|
|
83
83
|
transition: opacity 0.2s ease;
|
|
84
|
-
} .
|
|
84
|
+
} .select__option_px0d0:first-child:before {
|
|
85
85
|
display: none;
|
|
86
|
-
} .
|
|
86
|
+
} .select__s_px0d0 {
|
|
87
87
|
min-height: var(--size-s-height);
|
|
88
|
-
} .
|
|
88
|
+
} .select__m_px0d0 {
|
|
89
89
|
min-height: var(--size-m-height);
|
|
90
|
-
} .
|
|
90
|
+
} .select__l_px0d0 {
|
|
91
91
|
min-height: var(--size-l-height);
|
|
92
|
-
} .
|
|
92
|
+
} .select__xl_px0d0 {
|
|
93
93
|
min-height: var(--size-xl-height);
|
|
94
|
-
} .
|
|
95
|
-
.
|
|
94
|
+
} .select__l_px0d0,
|
|
95
|
+
.select__xl_px0d0 {
|
|
96
96
|
padding-left: var(--select-option-l-left-padding);
|
|
97
97
|
padding-right: var(--select-option-l-right-padding)
|
|
98
|
-
} .
|
|
98
|
+
} .select__l_px0d0:before, .select__xl_px0d0:before {
|
|
99
99
|
left: var(--select-option-l-left-padding);
|
|
100
100
|
right: var(--select-option-l-right-padding);
|
|
101
|
-
} .
|
|
101
|
+
} .select__selected_px0d0 {
|
|
102
102
|
background: var(--select-option-selected-background);
|
|
103
103
|
color: var(--select-option-selected-color);
|
|
104
104
|
cursor: default;
|
|
105
|
-
} .
|
|
105
|
+
} .select__highlighted_px0d0 {
|
|
106
106
|
background: var(--select-option-hover-background);
|
|
107
107
|
color: var(--select-option-hover-color)
|
|
108
|
-
} .
|
|
109
|
-
.
|
|
108
|
+
} .select__highlighted_px0d0:before,
|
|
109
|
+
.select__highlighted_px0d0 + .select__option_px0d0:before {
|
|
110
110
|
opacity: 0;
|
|
111
|
-
} .
|
|
111
|
+
} .select__disabled_px0d0 {
|
|
112
112
|
cursor: var(--disabled-cursor);
|
|
113
113
|
background: var(--select-option-disabled-background);
|
|
114
114
|
color: var(--select-option-disabled-color);
|
|
115
|
-
} .
|
|
115
|
+
} .select__content_px0d0 {
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
flex: 1;
|
|
118
118
|
text-overflow: ellipsis;
|
|
119
|
-
} .
|
|
119
|
+
} .select__textContent_px0d0 {
|
|
120
120
|
padding-top: var(--gap-s);
|
|
121
121
|
padding-bottom: var(--gap-s);
|
|
122
122
|
} /* IE min-height fix */ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
|
|
123
|
-
.
|
|
123
|
+
.select__option_px0d0:after {
|
|
124
124
|
min-height: inherit;
|
|
125
125
|
font-size: 0;
|
|
126
126
|
content: '';
|
|
@@ -7,7 +7,7 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
|
|
|
7
7
|
import { useVisibleOptions, isGroup } from '../../utils.js';
|
|
8
8
|
import { Optgroup } from '../optgroup/Component.js';
|
|
9
9
|
|
|
10
|
-
const styles = {"optionsList":"
|
|
10
|
+
const styles = {"optionsList":"select__optionsList_1lg4i","optionsListHeader":"select__optionsListHeader_1lg4i","optionsListFooter":"select__optionsListFooter_1lg4i","withBorder":"select__withBorder_1lg4i","scrollable":"select__scrollable_1lg4i","emptyPlaceholder":"select__emptyPlaceholder_1lg4i","l":"select__l_1lg4i","xl":"select__xl_1lg4i"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const createCounter = () => {
|
|
@@ -15,7 +15,7 @@ const createCounter = () => {
|
|
|
15
15
|
// eslint-disable-next-line no-plusplus
|
|
16
16
|
return () => count++;
|
|
17
17
|
};
|
|
18
|
-
const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, scrollbarClassName, Option, getOptionProps, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, onScroll, open, header, footer, showFooter = true, optionsListWidth, nativeScrollbar: nativeScrollbarProp, flatOptions = [], }, ref) => {
|
|
18
|
+
const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, scrollbarClassName, Option, getOptionProps, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, onScroll, open, header, footer, showFooter = true, optionsListWidth, nativeScrollbar: nativeScrollbarProp, flatOptions = [], setHighlightedIndex, }, ref) => {
|
|
19
19
|
let [nativeScrollbar] = useMedia([[true, '(max-width: 1023px)']], false);
|
|
20
20
|
nativeScrollbar = Boolean(nativeScrollbarProp ?? nativeScrollbar);
|
|
21
21
|
const renderOption = (option, index) => (React.createElement(Option, { key: option.key, ...getOptionProps(option, index) }));
|
|
@@ -45,10 +45,11 @@ const OptionsList = forwardRef(({ size = 's', className, optionGroupClassName, s
|
|
|
45
45
|
return (React.createElement(Scrollbar, { className: cn(styles.scrollable, scrollbarClassName), ref: scrollbarRef, horizontalAutoStretch: optionsListWidth === 'content', scrollableNodeProps: scrollableNodeProps, contentNodeProps: { ref: listRef } }, renderListItems()));
|
|
46
46
|
};
|
|
47
47
|
const renderWithNativeScrollbar = () => (React.createElement("div", { className: cn(styles.scrollable, scrollbarClassName), ref: mergeRefs([listRef, ref]), onScroll: onScroll }, renderListItems()));
|
|
48
|
+
const resetHighlightedIndex = () => setHighlightedIndex?.(-1);
|
|
48
49
|
return (React.createElement("div", { ...(nativeScrollbar && { 'data-test-id': dataTestId }), className: cn(styles.optionsList, styles[size], className) },
|
|
49
|
-
header && React.createElement("div", { className: styles.optionsListHeader }, header),
|
|
50
|
+
header && (React.createElement("div", { className: styles.optionsListHeader, onMouseEnter: resetHighlightedIndex }, header)),
|
|
50
51
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
51
|
-
showFooter && footer && (React.createElement("div", { className: cn(styles.optionsListFooter, {
|
|
52
|
+
showFooter && footer && (React.createElement("div", { onMouseEnter: resetHighlightedIndex, className: cn(styles.optionsListFooter, {
|
|
52
53
|
[styles.withBorder]: visibleOptions && flatOptions.length > visibleOptions,
|
|
53
54
|
}) }, footer))));
|
|
54
55
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: wb5pc */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-secondary: #e9e9eb;
|
|
@@ -29,28 +29,28 @@
|
|
|
29
29
|
/* checkmark */
|
|
30
30
|
|
|
31
31
|
/* optgroup */
|
|
32
|
-
} .
|
|
32
|
+
} .select__optionsList_1lg4i {
|
|
33
33
|
width: 100%;
|
|
34
34
|
outline: none;
|
|
35
35
|
box-sizing: border-box;
|
|
36
36
|
position: relative;
|
|
37
|
-
} .
|
|
37
|
+
} .select__optionsListHeader_1lg4i {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
40
|
-
} .
|
|
40
|
+
} .select__optionsListFooter_1lg4i {
|
|
41
41
|
position: sticky;
|
|
42
42
|
bottom: 0;
|
|
43
43
|
box-sizing: border-box;
|
|
44
44
|
border-top: 1px solid transparent
|
|
45
|
-
} .
|
|
45
|
+
} .select__optionsListFooter_1lg4i.select__withBorder_1lg4i {
|
|
46
46
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
47
|
-
} .
|
|
47
|
+
} .select__scrollable_1lg4i {
|
|
48
48
|
overflow: auto;
|
|
49
49
|
width: 100%;
|
|
50
|
-
} .
|
|
50
|
+
} .select__emptyPlaceholder_1lg4i {
|
|
51
51
|
padding: var(--gap-m) var(--gap-s);
|
|
52
52
|
color: var(--select-options-list-empty-placeholder-color);
|
|
53
|
-
} .
|
|
54
|
-
.
|
|
53
|
+
} .select__l_1lg4i .select__emptyPlaceholder_1lg4i,
|
|
54
|
+
.select__xl_1lg4i .select__emptyPlaceholder_1lg4i {
|
|
55
55
|
padding: var(--gap-xl) var(--gap-m);
|
|
56
56
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
declare const Search: React.ForwardRefExoticComponent<Omit<import("
|
|
3
|
+
declare const Search: React.ForwardRefExoticComponent<Omit<import("@alfalab/core-components-input/components/base-input").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
4
4
|
breakpoint?: number | undefined;
|
|
5
5
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
6
6
|
} & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
4
4
|
import { MagnifierMIcon } from '@alfalab/icons-glyph/MagnifierMIcon';
|
|
5
5
|
|
|
6
|
-
const styles = {"component":"
|
|
6
|
+
const styles = {"component":"select__component_1tlb3"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const Search = forwardRef(({ clear = true, placeholder = 'Поиск', className, leftAddons = React.createElement(MagnifierMIcon, { color: '#86868A' }), ...restProps }, ref) => (React.createElement(Input, { ref: ref, className: cn(styles.component, className), placeholder: placeholder, leftAddons: leftAddons, clear: clear, ...restProps })));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1irwh */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
4
4
|
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
/* checkmark */
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
|
-
} .
|
|
26
|
+
} .select__component_1tlb3 {
|
|
27
27
|
width: auto;
|
|
28
28
|
}
|
|
@@ -8,10 +8,10 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
|
|
|
8
8
|
import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
|
|
9
9
|
import { Optgroup } from '../optgroup/Component.js';
|
|
10
10
|
|
|
11
|
-
const styles = {"virtualOptionsList":"
|
|
11
|
+
const styles = {"virtualOptionsList":"select__virtualOptionsList_1kp9u","virtualOptionsListHeader":"select__virtualOptionsListHeader_1kp9u","virtualOptionsListFooter":"select__virtualOptionsListFooter_1kp9u","withBorder":"select__withBorder_1kp9u","scrollable":"select__scrollable_1kp9u","inner":"select__inner_1kp9u","virtualRow":"select__virtualRow_1kp9u","highlighted":"select__highlighted_1kp9u","emptyPlaceholder":"select__emptyPlaceholder_1kp9u","l":"select__l_1kp9u","xl":"select__xl_1kp9u"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
|
-
const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlightedIndex = -1, className, getOptionProps, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, }, ref) => {
|
|
14
|
+
const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlightedIndex = -1, className, getOptionProps, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, setHighlightedIndex, }, ref) => {
|
|
15
15
|
const listRef = useRef(null);
|
|
16
16
|
const parentRef = useRef(null);
|
|
17
17
|
const scrollbarRef = useRef(null);
|
|
@@ -109,14 +109,15 @@ const VirtualOptionsList = forwardRef(({ size = 's', flatOptions = [], highlight
|
|
|
109
109
|
}
|
|
110
110
|
return React.createElement("div", { ...contentNodeProps }, renderList());
|
|
111
111
|
};
|
|
112
|
+
const resetHighlightedIndex = () => setHighlightedIndex?.(-1);
|
|
112
113
|
if (options.length === 0 && !emptyPlaceholder) {
|
|
113
114
|
return null;
|
|
114
115
|
}
|
|
115
116
|
return (React.createElement("div", { className: cn(styles.virtualOptionsList, styles[size], className), "data-test-id": dataTestId },
|
|
116
|
-
header && React.createElement("div", { className: styles.virtualOptionsListHeader }, header),
|
|
117
|
+
header && (React.createElement("div", { className: styles.virtualOptionsListHeader, onMouseEnter: resetHighlightedIndex }, header)),
|
|
117
118
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
118
119
|
emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder)),
|
|
119
|
-
showFooter && footer && (React.createElement("div", { className: cn(styles.virtualOptionsListFooter, {
|
|
120
|
+
showFooter && footer && (React.createElement("div", { onMouseEnter: resetHighlightedIndex, className: cn(styles.virtualOptionsListFooter, {
|
|
120
121
|
[styles.withBorder]: visibleOptions && flatOptions.length > visibleOptions,
|
|
121
122
|
}) }, footer))));
|
|
122
123
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1twi1 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-primary: #dcdcdd;
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_1kp9u {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_1kp9u {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_1kp9u {
|
|
47
47
|
position: sticky;
|
|
48
48
|
bottom: 0;
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
border-top: 1px solid transparent
|
|
51
|
-
} .
|
|
51
|
+
} .select__virtualOptionsListFooter_1kp9u.select__withBorder_1kp9u {
|
|
52
52
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_1kp9u {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_1kp9u {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_1kp9u {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_1kp9u:before {
|
|
66
66
|
content: '';
|
|
67
67
|
position: absolute;
|
|
68
68
|
z-index: 1;
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
height: 1px;
|
|
73
73
|
background: var(--select-option-divider-background);
|
|
74
74
|
display: var(--select-option-divider-display);
|
|
75
|
-
} .
|
|
75
|
+
} .select__virtualRow_1kp9u:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_1kp9u:before,
|
|
78
|
+
.select__highlighted_1kp9u + .select__virtualRow_1kp9u:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_1kp9u {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .
|
|
84
|
-
.
|
|
83
|
+
} .select__l_1kp9u .select__emptyPlaceholder_1kp9u,
|
|
84
|
+
.select__xl_1kp9u .select__emptyPlaceholder_1kp9u {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonDesktop };
|
|
6
|
+
export type { CommonButtonProps as ButtonDesktopProps } from "./typings-89f0cb07";
|
|
@@ -82,7 +82,7 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
82
82
|
searchProps: {
|
|
83
83
|
value: string;
|
|
84
84
|
onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
85
|
-
componentProps?: import("
|
|
85
|
+
componentProps?: import("@alfalab/core-components-input").InputProps | undefined;
|
|
86
86
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
87
|
} | undefined;
|
|
88
88
|
};
|
|
@@ -10,7 +10,7 @@ const OptionsListWithApply = forwardRef(({ toggleMenu, getOptionProps: defaultGe
|
|
|
10
10
|
const optionProps = defaultGetOptionProps(option, index);
|
|
11
11
|
const selected = option.key === SELECT_ALL_KEY
|
|
12
12
|
? selectedDraft.length === flatOptions.length - 1
|
|
13
|
-
: selectedDraft.
|
|
13
|
+
: selectedDraft.some(({ key }) => key === option.key);
|
|
14
14
|
return {
|
|
15
15
|
...optionProps,
|
|
16
16
|
selected,
|
|
@@ -1,38 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
import { FC } from "react";
|
|
4
|
-
import { BaseButtonProps } from "./typings-9211a437";
|
|
5
|
-
/**
|
|
6
|
-
* Минимальное время отображения лоадера - 500мс,
|
|
7
|
-
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
8
|
-
*/
|
|
9
|
-
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
10
|
-
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
11
|
-
type SpinnerProps = {
|
|
12
|
-
/**
|
|
13
|
-
* Управление видимостью компонента
|
|
14
|
-
*/
|
|
15
|
-
visible?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Размер компонента
|
|
18
|
-
*/
|
|
19
|
-
size?: "xs" | "s" | "m";
|
|
20
|
-
/**
|
|
21
|
-
* Дополнительный класс
|
|
22
|
-
*/
|
|
23
|
-
className?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Идентификатор компонента в DOM
|
|
26
|
-
*/
|
|
27
|
-
id?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
30
|
-
*/
|
|
31
|
-
dataTestId?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Палитра, в контексте которой используется спиннер
|
|
34
|
-
*/
|
|
35
|
-
colors?: "default" | "inverted";
|
|
36
|
-
};
|
|
37
|
-
declare const Spinner: FC<SpinnerProps>;
|
|
38
|
-
export { LOADER_MIN_DISPLAY_INTERVAL, BaseButton, SpinnerProps, Spinner };
|
|
2
|
+
export * from "./Component-89f0cb07";
|
package/modern/index.js
CHANGED
|
@@ -39,7 +39,7 @@ import '@alfalab/core-components-base-modal/modern';
|
|
|
39
39
|
import '@alfalab/core-components-button/modern/mobile';
|
|
40
40
|
import './components/virtual-options-list/Component.js';
|
|
41
41
|
import 'react-virtual';
|
|
42
|
-
import './hook-
|
|
42
|
+
import './hook-ba0e806d.js';
|
|
43
43
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
44
44
|
import '@alfalab/core-components-button/modern/desktop';
|
|
45
45
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/modern/mobile.js
CHANGED
|
@@ -33,7 +33,7 @@ import '@alfalab/core-components-base-modal/modern';
|
|
|
33
33
|
import '@alfalab/core-components-button/modern/mobile';
|
|
34
34
|
import './components/virtual-options-list/Component.js';
|
|
35
35
|
import 'react-virtual';
|
|
36
|
-
import './hook-
|
|
36
|
+
import './hook-ba0e806d.js';
|
|
37
37
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
38
38
|
import '@alfalab/core-components-button/modern/desktop';
|
|
39
39
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|