@alfalab/core-components-input-autocomplete 10.1.6 → 10.2.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.
- package/Component.desktop.d.ts +2 -2
- package/Component.mobile.js +2 -1
- package/Component.modal.mobile.js +2 -1
- package/Component.responsive.d.ts +2 -2
- package/Component.responsive.js +2 -1
- package/autocomplete-field/Component.js +1 -1
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-mobile-field/Component.js +3 -2
- package/autocomplete-mobile-field/index.css +8 -8
- package/autocomplete-mobile-field/index.js +1 -0
- package/cssm/Component.desktop.d.ts +2 -2
- package/cssm/Component.mobile.js +1 -0
- package/cssm/Component.modal.mobile.js +1 -0
- package/cssm/Component.responsive.d.ts +2 -2
- package/cssm/Component.responsive.js +1 -0
- package/cssm/autocomplete-mobile-field/Component.js +2 -1
- package/cssm/autocomplete-mobile-field/index.js +1 -0
- package/cssm/hook-8abfea97.d.ts +1 -1
- package/cssm/index-c76d6398.d.ts +185 -2
- package/cssm/index-ebda875c.d.ts +10 -0
- package/cssm/index-f12ee135.d.ts +52 -3
- package/cssm/index.js +1 -0
- package/cssm/mobile.js +1 -0
- package/{esm/types-e40becc7.d.ts → cssm/types-72dda473.d.ts} +1 -1
- package/esm/Component.desktop.d.ts +2 -2
- package/esm/Component.mobile.js +2 -1
- package/esm/Component.modal.mobile.js +2 -1
- package/esm/Component.responsive.d.ts +2 -2
- package/esm/Component.responsive.js +2 -1
- package/esm/autocomplete-field/Component.js +1 -1
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-mobile-field/Component.js +3 -2
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/autocomplete-mobile-field/index.js +1 -0
- package/esm/hook-8abfea97.d.ts +1 -1
- package/esm/index-c76d6398.d.ts +185 -2
- package/esm/index-ebda875c.d.ts +10 -0
- package/esm/index-f12ee135.d.ts +52 -3
- package/esm/index.js +2 -1
- package/esm/mobile.css +4 -4
- package/esm/mobile.js +2 -1
- package/esm/{mobile.module-a93c9068.js → mobile.module-db1787d4.js} +1 -1
- package/{cssm/types-e40becc7.d.ts → esm/types-72dda473.d.ts} +1 -1
- package/hook-8abfea97.d.ts +1 -1
- package/index-c76d6398.d.ts +185 -2
- package/index-ebda875c.d.ts +10 -0
- package/index-f12ee135.d.ts +52 -3
- package/index.js +2 -1
- package/mobile.css +4 -4
- package/mobile.js +2 -1
- package/{mobile.module-ca86f5ea.js → mobile.module-a683dbb2.js} +1 -1
- package/modern/Component-dd8ca091.d.ts +70 -20
- package/modern/Component.desktop.d.ts +2 -2
- package/modern/Component.mobile-ebda875c.d.ts +6 -0
- package/modern/Component.mobile.d.ts +1 -1
- package/modern/Component.mobile.js +2 -1
- package/modern/Component.modal.mobile.d.ts +1 -1
- package/modern/Component.modal.mobile.js +2 -1
- package/modern/Component.responsive.d.ts +4 -4
- package/modern/Component.responsive.js +2 -1
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-mobile-field/Component.js +3 -2
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/autocomplete-mobile-field/index.js +1 -0
- package/modern/desktop-63dec22f.d.ts +6 -2
- package/modern/hook-8abfea97.d.ts +1 -1
- package/modern/index-c76d6398.d.ts +185 -2
- package/modern/index-ebda875c.d.ts +10 -0
- package/modern/index-f12ee135.d.ts +52 -3
- package/modern/index.js +2 -1
- package/modern/mobile-96988a65.d.ts +2 -5
- package/modern/mobile.css +4 -4
- package/modern/mobile.js +2 -1
- package/modern/{mobile.module-e72a1e20.js → mobile.module-5660f91c.js} +1 -1
- package/modern/shared-4cd3936b.d.ts +0 -1
- package/modern/{types-e40becc7.d.ts → types-72dda473.d.ts} +1 -1
- package/package.json +5 -4
- package/src/autocomplete-mobile-field/Component.tsx +2 -1
- package/{types-e40becc7.d.ts → types-72dda473.d.ts} +1 -1
- package/Component-72308007.d.ts +0 -276
- package/Component-72dda473.d.ts +0 -53
- package/component-72308007.d.ts +0 -44
- package/cssm/Component-72308007.d.ts +0 -276
- package/cssm/Component-72dda473.d.ts +0 -53
- package/cssm/component-72308007.d.ts +0 -44
- package/cssm/index-72308007.d.ts +0 -54
- package/cssm/types-83e2bd9e.d.ts +0 -113
- package/cssm/utils-49cc3c24.d.ts +0 -8
- package/esm/Component-72308007.d.ts +0 -276
- package/esm/Component-72dda473.d.ts +0 -53
- package/esm/component-72308007.d.ts +0 -44
- package/esm/index-72308007.d.ts +0 -54
- package/esm/types-83e2bd9e.d.ts +0 -113
- package/esm/utils-49cc3c24.d.ts +0 -8
- package/index-72308007.d.ts +0 -54
- package/modern/Component-72308007.d.ts +0 -276
- package/modern/Component-72dda473.d.ts +0 -53
- package/modern/Component-96988a65.d.ts +0 -9
- package/modern/component-72308007.d.ts +0 -44
- package/modern/index-72308007.d.ts +0 -54
- package/modern/types-83e2bd9e.d.ts +0 -113
- package/modern/utils-49cc3c24.d.ts +0 -8
- package/types-83e2bd9e.d.ts +0 -113
- package/utils-49cc3c24.d.ts +0 -8
package/Component.desktop.d.ts
CHANGED
|
@@ -37,14 +37,14 @@ declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<Omit<Bas
|
|
|
37
37
|
/**
|
|
38
38
|
* Компонент ввода значения
|
|
39
39
|
*/
|
|
40
|
-
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
40
|
+
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
41
41
|
breakpoint?: number | undefined;
|
|
42
42
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
43
43
|
} & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* Пропсы, которые будут прокинуты в инпут
|
|
46
46
|
*/
|
|
47
|
-
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
47
|
+
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
48
48
|
breakpoint?: number | undefined;
|
|
49
49
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
50
50
|
} & Record<string, unknown>) | undefined;
|
package/Component.mobile.js
CHANGED
|
@@ -11,8 +11,9 @@ var mobile$1 = require('@alfalab/core-components-button/mobile');
|
|
|
11
11
|
var coreComponentsInput = require('@alfalab/core-components-input');
|
|
12
12
|
var mobile = require('@alfalab/core-components-select/mobile');
|
|
13
13
|
var autocompleteMobileField_Component = require('./autocomplete-mobile-field/Component.js');
|
|
14
|
-
var mobile_module = require('./mobile.module-
|
|
14
|
+
var mobile_module = require('./mobile.module-a683dbb2.js');
|
|
15
15
|
require('@alfalab/core-components-form-control/mobile');
|
|
16
|
+
require('@alfalab/core-components-shared');
|
|
16
17
|
require('@alfalab/hooks');
|
|
17
18
|
|
|
18
19
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -11,8 +11,9 @@ var mobile$1 = require('@alfalab/core-components-button/mobile');
|
|
|
11
11
|
var coreComponentsInput = require('@alfalab/core-components-input');
|
|
12
12
|
var mobile = require('@alfalab/core-components-select/mobile');
|
|
13
13
|
var autocompleteMobileField_Component = require('./autocomplete-mobile-field/Component.js');
|
|
14
|
-
var mobile_module = require('./mobile.module-
|
|
14
|
+
var mobile_module = require('./mobile.module-a683dbb2.js');
|
|
15
15
|
require('@alfalab/core-components-form-control/mobile');
|
|
16
|
+
require('@alfalab/core-components-shared');
|
|
16
17
|
require('@alfalab/hooks');
|
|
17
18
|
|
|
18
19
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -13,11 +13,11 @@ type InputAutocompleteResponsiveProps = InputAutocompleteDesktopProps & InputAut
|
|
|
13
13
|
};
|
|
14
14
|
type InputAutocompleteMedia = 'desktop' | 'mobile';
|
|
15
15
|
declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "nativeSelect" | "Field"> & {
|
|
16
|
-
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
16
|
+
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
17
17
|
breakpoint?: number | undefined;
|
|
18
18
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
19
19
|
} & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
20
|
-
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
20
|
+
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
21
21
|
breakpoint?: number | undefined;
|
|
22
22
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
23
23
|
} & Record<string, unknown>) | undefined;
|
package/Component.responsive.js
CHANGED
|
@@ -18,7 +18,8 @@ require('@alfalab/core-components-input');
|
|
|
18
18
|
require('@alfalab/core-components-select/mobile');
|
|
19
19
|
require('./autocomplete-mobile-field/Component.js');
|
|
20
20
|
require('@alfalab/core-components-form-control/mobile');
|
|
21
|
-
require('
|
|
21
|
+
require('@alfalab/core-components-shared');
|
|
22
|
+
require('./mobile.module-a683dbb2.js');
|
|
22
23
|
|
|
23
24
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
24
25
|
|
|
@@ -14,7 +14,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
14
14
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
16
|
|
|
17
|
-
var styles = {"arrow":"input-
|
|
17
|
+
var styles = {"arrow":"input-autocomplete__arrow_1ovyt","error":"input-autocomplete__error_1ovyt"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var AutocompleteField = function (_a) {
|
|
@@ -6,6 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var mobile = require('@alfalab/core-components-form-control/mobile');
|
|
9
|
+
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
9
10
|
var hooks = require('@alfalab/hooks');
|
|
10
11
|
|
|
11
12
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -13,7 +14,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
14
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
16
|
|
|
16
|
-
var styles = {"component":"input-
|
|
17
|
+
var styles = {"component":"input-autocomplete__component_1ruvq","field":"input-autocomplete__field_1ruvq","disabled":"input-autocomplete__disabled_1ruvq","placeholder":"input-autocomplete__placeholder_1ruvq","contentWrapper":"input-autocomplete__contentWrapper_1ruvq","value":"input-autocomplete__value_1ruvq","focusVisible":"input-autocomplete__focusVisible_1ruvq"};
|
|
17
18
|
require('./index.css')
|
|
18
19
|
|
|
19
20
|
var AutocompleteMobileField = function (_a) {
|
|
@@ -28,7 +29,7 @@ var AutocompleteMobileField = function (_a) {
|
|
|
28
29
|
React__default.default.createElement(mobile.FormControlMobile, tslib.__assign({ fieldClassName: cn__default.default(styles.field, fieldClassName, (_b = {},
|
|
29
30
|
_b[styles.disabled] = disabled,
|
|
30
31
|
_b[styles.focusVisible] = focusVisible,
|
|
31
|
-
_b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, labelView: labelView, rightAddons: Arrow,
|
|
32
|
+
_b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, labelView: labelView, rightAddons: Arrow, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'form-control') }, restProps, innerProps),
|
|
32
33
|
React__default.default.createElement("div", { className: styles.contentWrapper },
|
|
33
34
|
showPlaceholder && React__default.default.createElement("span", { className: styles.placeholder }, placeholder),
|
|
34
35
|
filled && React__default.default.createElement("div", { className: styles.value }, value)))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1oxms */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
--focus-color: var(--color-light-border-link);
|
|
20
20
|
--disabled-cursor: not-allowed;
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__component_1ruvq {
|
|
22
22
|
width: 100%;
|
|
23
23
|
outline: none;
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__field_1ruvq:not(.input-autocomplete__disabled_1ruvq) {
|
|
25
25
|
cursor: pointer;
|
|
26
|
-
} .input-
|
|
26
|
+
} .input-autocomplete__disabled_1ruvq {
|
|
27
27
|
cursor: var(--disabled-cursor);
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__placeholder_1ruvq {
|
|
29
29
|
color: var(--color-light-text-secondary);
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__contentWrapper_1ruvq {
|
|
31
31
|
font-size: 16px;
|
|
32
32
|
line-height: 20px;
|
|
33
33
|
font-weight: 400;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
text-overflow: ellipsis;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
width: 100%;
|
|
39
|
-
} .input-
|
|
39
|
+
} .input-autocomplete__value_1ruvq {
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
text-align: left;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__focusVisible_1ruvq {
|
|
44
44
|
outline: 2px solid var(--focus-color);
|
|
45
45
|
outline-offset: 2px;
|
|
46
46
|
}
|
|
@@ -37,14 +37,14 @@ declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<Omit<Bas
|
|
|
37
37
|
/**
|
|
38
38
|
* Компонент ввода значения
|
|
39
39
|
*/
|
|
40
|
-
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
40
|
+
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
41
41
|
breakpoint?: number | undefined;
|
|
42
42
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
43
43
|
} & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* Пропсы, которые будут прокинуты в инпут
|
|
46
46
|
*/
|
|
47
|
-
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
47
|
+
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
48
48
|
breakpoint?: number | undefined;
|
|
49
49
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
50
50
|
} & Record<string, unknown>) | undefined;
|
package/cssm/Component.mobile.js
CHANGED
|
@@ -13,6 +13,7 @@ var mobile = require('@alfalab/core-components-select/cssm/mobile');
|
|
|
13
13
|
var autocompleteMobileField_Component = require('./autocomplete-mobile-field/Component.js');
|
|
14
14
|
var styles = require('./mobile.module.css');
|
|
15
15
|
require('@alfalab/core-components-form-control/cssm/mobile');
|
|
16
|
+
require('@alfalab/core-components-shared/cssm');
|
|
16
17
|
require('@alfalab/hooks');
|
|
17
18
|
require('./autocomplete-mobile-field/index.module.css');
|
|
18
19
|
|
|
@@ -13,6 +13,7 @@ var mobile = require('@alfalab/core-components-select/cssm/mobile');
|
|
|
13
13
|
var autocompleteMobileField_Component = require('./autocomplete-mobile-field/Component.js');
|
|
14
14
|
var styles = require('./mobile.module.css');
|
|
15
15
|
require('@alfalab/core-components-form-control/cssm/mobile');
|
|
16
|
+
require('@alfalab/core-components-shared/cssm');
|
|
16
17
|
require('@alfalab/hooks');
|
|
17
18
|
require('./autocomplete-mobile-field/index.module.css');
|
|
18
19
|
|
|
@@ -13,11 +13,11 @@ type InputAutocompleteResponsiveProps = InputAutocompleteDesktopProps & InputAut
|
|
|
13
13
|
};
|
|
14
14
|
type InputAutocompleteMedia = 'desktop' | 'mobile';
|
|
15
15
|
declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "nativeSelect" | "Field"> & {
|
|
16
|
-
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
16
|
+
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
17
17
|
breakpoint?: number | undefined;
|
|
18
18
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
19
19
|
} & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
20
|
-
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
20
|
+
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
21
21
|
breakpoint?: number | undefined;
|
|
22
22
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
23
23
|
} & Record<string, unknown>) | undefined;
|
|
@@ -19,6 +19,7 @@ require('@alfalab/core-components-input/cssm');
|
|
|
19
19
|
require('@alfalab/core-components-select/cssm/mobile');
|
|
20
20
|
require('./autocomplete-mobile-field/Component.js');
|
|
21
21
|
require('@alfalab/core-components-form-control/cssm/mobile');
|
|
22
|
+
require('@alfalab/core-components-shared/cssm');
|
|
22
23
|
require('./autocomplete-mobile-field/index.module.css');
|
|
23
24
|
require('./mobile.module.css');
|
|
24
25
|
|
|
@@ -6,6 +6,7 @@ var tslib = require('tslib');
|
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var mobile = require('@alfalab/core-components-form-control/cssm/mobile');
|
|
9
|
+
var coreComponentsShared = require('@alfalab/core-components-shared/cssm');
|
|
9
10
|
var hooks = require('@alfalab/hooks');
|
|
10
11
|
var styles = require('./index.module.css');
|
|
11
12
|
|
|
@@ -27,7 +28,7 @@ var AutocompleteMobileField = function (_a) {
|
|
|
27
28
|
React__default.default.createElement(mobile.FormControlMobile, tslib.__assign({ fieldClassName: cn__default.default(styles__default.default.field, fieldClassName, (_b = {},
|
|
28
29
|
_b[styles__default.default.disabled] = disabled,
|
|
29
30
|
_b[styles__default.default.focusVisible] = focusVisible,
|
|
30
|
-
_b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, labelView: labelView, rightAddons: Arrow,
|
|
31
|
+
_b)), block: true, size: size, focused: focused, disabled: disabled, filled: filled, labelView: labelView, rightAddons: Arrow, dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'form-control') }, restProps, innerProps),
|
|
31
32
|
React__default.default.createElement("div", { className: styles__default.default.contentWrapper },
|
|
32
33
|
showPlaceholder && React__default.default.createElement("span", { className: styles__default.default.placeholder }, placeholder),
|
|
33
34
|
filled && React__default.default.createElement("div", { className: styles__default.default.value }, value)))));
|
package/cssm/hook-8abfea97.d.ts
CHANGED
|
@@ -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
|
};
|
package/cssm/index-c76d6398.d.ts
CHANGED
|
@@ -1,2 +1,185 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/* eslint-disable complexity */
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { ReactNode, ButtonHTMLAttributes, ElementType, AnchorHTMLAttributes, ReactElement } from "react";
|
|
5
|
+
import { ButtonProps } from "@alfalab/core-components-button";
|
|
6
|
+
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Вид компонента
|
|
9
|
+
*/
|
|
10
|
+
view: "desktop" | "mobile";
|
|
11
|
+
/**
|
|
12
|
+
* Дополнительный класс
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Позиция крестика
|
|
17
|
+
*/
|
|
18
|
+
align?: "left" | "right";
|
|
19
|
+
/**
|
|
20
|
+
* Фиксирует крестик
|
|
21
|
+
*/
|
|
22
|
+
sticky?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Иконка
|
|
25
|
+
*/
|
|
26
|
+
icon?: ElementType;
|
|
27
|
+
/**
|
|
28
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
29
|
+
*/
|
|
30
|
+
dataTestId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Коллбэк закрытия.
|
|
33
|
+
*/
|
|
34
|
+
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
35
|
+
}
|
|
36
|
+
type NavigationBarProps = {
|
|
37
|
+
/**
|
|
38
|
+
* Контент шапки
|
|
39
|
+
*/
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Заголовок шапки
|
|
43
|
+
*/
|
|
44
|
+
title?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Подзаголовок (доступен только в мобильной версии)
|
|
47
|
+
*/
|
|
48
|
+
subtitle?: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Размер заголовка (compact доступен только в мобильной версии)
|
|
51
|
+
*/
|
|
52
|
+
titleSize?: "default" | "compact";
|
|
53
|
+
/**
|
|
54
|
+
* Доп. класс для аддонов
|
|
55
|
+
*/
|
|
56
|
+
addonClassName?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Слот слева
|
|
59
|
+
*/
|
|
60
|
+
leftAddons?: ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Слот справа
|
|
63
|
+
*/
|
|
64
|
+
rightAddons?: ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* Дополнительный класс для closer
|
|
67
|
+
*/
|
|
68
|
+
closerClassName?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Слот снизу
|
|
71
|
+
*/
|
|
72
|
+
bottomAddons?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Наличие компонента крестика
|
|
75
|
+
*/
|
|
76
|
+
hasCloser?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Наличие кнопки "Назад"
|
|
79
|
+
*/
|
|
80
|
+
hasBackButton?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Дополнительный класс для правого аддона
|
|
83
|
+
*/
|
|
84
|
+
backButtonClassName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Дополнительный класс
|
|
87
|
+
*/
|
|
88
|
+
className?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Дополнительный класс для контента
|
|
91
|
+
*/
|
|
92
|
+
contentClassName?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Дополнительный класс для нижнего аддона
|
|
95
|
+
*/
|
|
96
|
+
bottomAddonsClassName?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Выравнивание заголовка
|
|
99
|
+
*/
|
|
100
|
+
align?: "left" | "center";
|
|
101
|
+
/**
|
|
102
|
+
* Обрезать ли заголовок
|
|
103
|
+
*/
|
|
104
|
+
trim?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Фиксирует шапку
|
|
107
|
+
*/
|
|
108
|
+
sticky?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
111
|
+
*/
|
|
112
|
+
dataTestId?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Фоновое изображение
|
|
115
|
+
*/
|
|
116
|
+
imageUrl?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Иконка closer.
|
|
119
|
+
*/
|
|
120
|
+
closerIcon?: React.ElementType;
|
|
121
|
+
/**
|
|
122
|
+
* Обработчик закрытия
|
|
123
|
+
*/
|
|
124
|
+
onClose?: CloserProps["onClose"];
|
|
125
|
+
/**
|
|
126
|
+
* обработчик клика по кнопке "назад"
|
|
127
|
+
*/
|
|
128
|
+
onBack?: () => void;
|
|
129
|
+
/**
|
|
130
|
+
* Вид шапки - мобильный или десктоп
|
|
131
|
+
*/
|
|
132
|
+
view: "desktop" | "mobile";
|
|
133
|
+
/**
|
|
134
|
+
* Ссылка на родительскую ноду overflow: auto
|
|
135
|
+
*/
|
|
136
|
+
scrollableParentRef?: React.RefObject<HTMLDivElement>;
|
|
137
|
+
};
|
|
138
|
+
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
139
|
+
type IconButtonProps = {
|
|
140
|
+
/**
|
|
141
|
+
* Компонент иконки
|
|
142
|
+
*/
|
|
143
|
+
icon: ElementType<{
|
|
144
|
+
className?: string;
|
|
145
|
+
}> | ReactElement;
|
|
146
|
+
/**
|
|
147
|
+
* Тип кнопки
|
|
148
|
+
*/
|
|
149
|
+
view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
|
|
150
|
+
/**
|
|
151
|
+
* Размер компонента
|
|
152
|
+
*/
|
|
153
|
+
size?: "xxs" | "xs" | "s";
|
|
154
|
+
/**
|
|
155
|
+
* Дополнительный класс
|
|
156
|
+
*/
|
|
157
|
+
className?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Выравнивание иконки
|
|
160
|
+
* @default 'center'
|
|
161
|
+
*/
|
|
162
|
+
alignIcon?: "left" | "center" | "right";
|
|
163
|
+
/**
|
|
164
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
165
|
+
*/
|
|
166
|
+
dataTestId?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Набор цветов для компонента
|
|
169
|
+
*/
|
|
170
|
+
colors?: "default" | "inverted";
|
|
171
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
|
|
172
|
+
declare const IconButton: React.ForwardRefExoticComponent<{
|
|
173
|
+
icon: ElementType<{
|
|
174
|
+
className?: string;
|
|
175
|
+
}> | ReactElement;
|
|
176
|
+
view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
|
|
177
|
+
size?: "s" | "xs" | "xxs" | undefined;
|
|
178
|
+
className?: string | undefined;
|
|
179
|
+
alignIcon?: "center" | "right" | "left" | undefined;
|
|
180
|
+
dataTestId?: string | undefined;
|
|
181
|
+
colors?: "default" | "inverted" | undefined;
|
|
182
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "Component" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
|
|
183
|
+
export { NavigationBar, IconButtonProps, IconButton };
|
|
184
|
+
export * from "./Component-63dec22f";
|
|
185
|
+
export type { NavigationBarProps };
|
package/cssm/index-ebda875c.d.ts
CHANGED
|
@@ -87,6 +87,14 @@ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
87
87
|
* Дополнительный класс для аддонов
|
|
88
88
|
*/
|
|
89
89
|
addonsClassName?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Свойства для обертки левых аддонов
|
|
92
|
+
*/
|
|
93
|
+
leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
|
|
94
|
+
/**
|
|
95
|
+
* Свойства для обертки правых аддонов
|
|
96
|
+
*/
|
|
97
|
+
rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
|
|
90
98
|
/**
|
|
91
99
|
* Идентификатор для систем автоматизированного тестирования
|
|
92
100
|
*/
|
|
@@ -126,6 +134,8 @@ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttribu
|
|
|
126
134
|
inputWrapperClassName?: string | undefined;
|
|
127
135
|
labelClassName?: string | undefined;
|
|
128
136
|
addonsClassName?: string | undefined;
|
|
137
|
+
leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
138
|
+
rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
129
139
|
dataTestId?: string | undefined;
|
|
130
140
|
children?: ReactNode;
|
|
131
141
|
styles: {
|
package/cssm/index-f12ee135.d.ts
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC, ReactNode, RefObject } from "react";
|
|
4
|
+
import { BottomSheetProps } from "./types-72dda473";
|
|
5
|
+
import { NavigationBarProps } from "./index-c76d6398";
|
|
6
|
+
import { SwipeableHandlers } from "react-swipeable";
|
|
7
|
+
import { BackdropProps } from "./index-ebda875c";
|
|
8
|
+
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const TIMEOUT = 500;
|
|
10
|
+
declare const SWIPE_VELOCITY = 0.4;
|
|
11
|
+
declare const MARKER_HEIGHT = 24;
|
|
12
|
+
declare const CLOSE_OFFSET = 0.2;
|
|
13
|
+
declare const SCROLL_OFFSET = 1;
|
|
14
|
+
declare const HEADER_OFFSET = 24;
|
|
15
|
+
declare const convertPercentToNumber: (value: string | number, fullHeight: number, headerOffset?: number) => number;
|
|
16
|
+
type FooterProps = {
|
|
17
|
+
/**
|
|
18
|
+
* Контент футера
|
|
19
|
+
*/
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Фиксирует футер
|
|
23
|
+
*/
|
|
24
|
+
sticky?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Дополнительный класс
|
|
27
|
+
*/
|
|
28
|
+
className?: string;
|
|
29
|
+
};
|
|
30
|
+
declare const Footer: FC<FooterProps>;
|
|
31
|
+
type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
|
|
32
|
+
headerRef: RefObject<HTMLDivElement>;
|
|
33
|
+
headerOffset: number;
|
|
34
|
+
};
|
|
35
|
+
declare const Header: FC<HeaderProps>;
|
|
36
|
+
type SwipeableBackdropProps = BackdropProps & {
|
|
37
|
+
/**
|
|
38
|
+
* Прозрачность бэкдропа
|
|
39
|
+
*/
|
|
40
|
+
opacity?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Обработчики свайпа
|
|
43
|
+
*/
|
|
44
|
+
handlers?: SwipeableHandlers;
|
|
45
|
+
/**
|
|
46
|
+
* Время анимации opacity
|
|
47
|
+
*/
|
|
48
|
+
opacityTimeout?: number;
|
|
49
|
+
};
|
|
50
|
+
declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
|
|
51
|
+
export { BottomSheet, TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, CLOSE_OFFSET, SCROLL_OFFSET, HEADER_OFFSET, convertPercentToNumber, FooterProps, Footer, HeaderProps, Header, SwipeableBackdropProps, SwipeableBackdrop };
|
|
52
|
+
export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-72dda473";
|
package/cssm/index.js
CHANGED
|
@@ -20,6 +20,7 @@ require('@alfalab/core-components-input/cssm');
|
|
|
20
20
|
require('@alfalab/core-components-select/cssm/mobile');
|
|
21
21
|
require('./autocomplete-mobile-field/Component.js');
|
|
22
22
|
require('@alfalab/core-components-form-control/cssm/mobile');
|
|
23
|
+
require('@alfalab/core-components-shared/cssm');
|
|
23
24
|
require('./autocomplete-mobile-field/index.module.css');
|
|
24
25
|
require('./mobile.module.css');
|
|
25
26
|
|
package/cssm/mobile.js
CHANGED
|
@@ -14,6 +14,7 @@ require('@alfalab/core-components-input/cssm');
|
|
|
14
14
|
require('@alfalab/core-components-select/cssm/mobile');
|
|
15
15
|
require('./autocomplete-mobile-field/Component.js');
|
|
16
16
|
require('@alfalab/core-components-form-control/cssm/mobile');
|
|
17
|
+
require('@alfalab/core-components-shared/cssm');
|
|
17
18
|
require('@alfalab/hooks');
|
|
18
19
|
require('./autocomplete-mobile-field/index.module.css');
|
|
19
20
|
require('./mobile.module.css');
|
|
@@ -37,14 +37,14 @@ declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<Omit<Bas
|
|
|
37
37
|
/**
|
|
38
38
|
* Компонент ввода значения
|
|
39
39
|
*/
|
|
40
|
-
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
40
|
+
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
41
41
|
breakpoint?: number | undefined;
|
|
42
42
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
43
43
|
} & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
44
44
|
/**
|
|
45
45
|
* Пропсы, которые будут прокинуты в инпут
|
|
46
46
|
*/
|
|
47
|
-
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
47
|
+
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
48
48
|
breakpoint?: number | undefined;
|
|
49
49
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
50
50
|
} & Record<string, unknown>) | undefined;
|
package/esm/Component.mobile.js
CHANGED
|
@@ -7,8 +7,9 @@ import { ButtonMobile } from '@alfalab/core-components-button/esm/mobile';
|
|
|
7
7
|
import { Input } from '@alfalab/core-components-input/esm';
|
|
8
8
|
import { SelectMobile } from '@alfalab/core-components-select/esm/mobile';
|
|
9
9
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
10
|
-
import { s as styles } from './mobile.module-
|
|
10
|
+
import { s as styles } from './mobile.module-db1787d4.js';
|
|
11
11
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
12
|
+
import '@alfalab/core-components-shared/esm';
|
|
12
13
|
import '@alfalab/hooks';
|
|
13
14
|
|
|
14
15
|
var SELECTED = [];
|
|
@@ -7,8 +7,9 @@ import { ButtonMobile } from '@alfalab/core-components-button/esm/mobile';
|
|
|
7
7
|
import { Input } from '@alfalab/core-components-input/esm';
|
|
8
8
|
import { SelectModalMobile } from '@alfalab/core-components-select/esm/mobile';
|
|
9
9
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
10
|
-
import { s as styles } from './mobile.module-
|
|
10
|
+
import { s as styles } from './mobile.module-db1787d4.js';
|
|
11
11
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
12
|
+
import '@alfalab/core-components-shared/esm';
|
|
12
13
|
import '@alfalab/hooks';
|
|
13
14
|
|
|
14
15
|
var InputAutocompleteModalMobile = React.forwardRef(function (_a, ref) {
|
|
@@ -13,11 +13,11 @@ type InputAutocompleteResponsiveProps = InputAutocompleteDesktopProps & InputAut
|
|
|
13
13
|
};
|
|
14
14
|
type InputAutocompleteMedia = 'desktop' | 'mobile';
|
|
15
15
|
declare const InputAutocompleteResponsive: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "nativeSelect" | "Field"> & {
|
|
16
|
-
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
16
|
+
Input?: React.FC<Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
17
17
|
breakpoint?: number | undefined;
|
|
18
18
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
19
19
|
} & React.RefAttributes<HTMLInputElement>> | undefined;
|
|
20
|
-
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "
|
|
20
|
+
inputProps?: (Omit<import("./autocomplete-field/Component").BaseInputProps, "colorStyles" | "FormControlComponent"> & {
|
|
21
21
|
breakpoint?: number | undefined;
|
|
22
22
|
defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
|
|
23
23
|
} & Record<string, unknown>) | undefined;
|
|
@@ -14,7 +14,8 @@ import '@alfalab/core-components-input/esm';
|
|
|
14
14
|
import '@alfalab/core-components-select/esm/mobile';
|
|
15
15
|
import './autocomplete-mobile-field/Component.js';
|
|
16
16
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
17
|
-
import '
|
|
17
|
+
import '@alfalab/core-components-shared/esm';
|
|
18
|
+
import './mobile.module-db1787d4.js';
|
|
18
19
|
|
|
19
20
|
var InputAutocompleteResponsive = forwardRef(function (_a, ref) {
|
|
20
21
|
var _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = __rest(_a, ["breakpoint"]);
|