@ozen-ui/kit 0.59.0 → 0.61.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/__inner__/cjs/components/Autocomplete/helper.d.ts +7 -72
- package/__inner__/cjs/components/Autocomplete/types.d.ts +11 -17
- package/__inner__/cjs/components/AutocompleteNext/helpers.d.ts +7 -77
- package/__inner__/cjs/components/AutocompleteNext/types.d.ts +10 -16
- package/__inner__/cjs/components/DatePicker/DatePicker.d.ts +2 -36
- package/__inner__/cjs/components/DatePicker/types.d.ts +5 -14
- package/__inner__/cjs/components/Segment/Segment.js +1 -1
- package/__inner__/cjs/components/Segment/components/SegmentItem/SegmentItem.js +1 -1
- package/__inner__/cjs/components/Select/Select.css +6 -0
- package/__inner__/cjs/components/Select/Select.js +41 -59
- package/__inner__/cjs/components/Select/components/SelectInput/SelectInput.js +5 -6
- package/__inner__/cjs/components/Select/components/SelectInputContextConsumer/SelectInputContextConsumer.d.ts +5 -0
- package/__inner__/cjs/components/Select/components/{SelectConsumer/SelectInputConsumer.js → SelectInputContextConsumer/SelectInputContextConsumer.js} +3 -3
- package/__inner__/cjs/components/Select/components/SelectInputContextConsumer/index.d.ts +1 -0
- package/__inner__/cjs/components/Select/components/{SelectConsumer → SelectInputContextConsumer}/index.js +1 -1
- package/__inner__/cjs/components/Select/helpers/types.d.ts +5 -8
- package/__inner__/cjs/components/Select/helpers/types.js +5 -1
- package/__inner__/cjs/components/Select/types.d.ts +43 -41
- package/__inner__/cjs/components/Stack/types.d.ts +2 -2
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_bBusinessDark.css +15 -15
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_bBusinessDefault.css +20 -20
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDark.css +15 -15
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_ozenDefault.css +20 -20
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_vipDark.css +15 -15
- package/__inner__/cjs/components/ThemeProvider/_color/Theme_color_vipDefault.css +20 -20
- package/__inner__/cjs/components/ThemeProvider/index.d.ts +2 -0
- package/__inner__/cjs/components/ThemeProvider/index.js +2 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeVipDark.d.ts +14 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeVipDark.js +30 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeVipDefault.d.ts +14 -0
- package/__inner__/cjs/components/ThemeProvider/themes/themeVipDefault.js +30 -0
- package/__inner__/esm/components/Autocomplete/helper.d.ts +7 -72
- package/__inner__/esm/components/Autocomplete/types.d.ts +11 -17
- package/__inner__/esm/components/AutocompleteNext/helpers.d.ts +7 -77
- package/__inner__/esm/components/AutocompleteNext/types.d.ts +10 -16
- package/__inner__/esm/components/DatePicker/DatePicker.d.ts +2 -36
- package/__inner__/esm/components/DatePicker/types.d.ts +5 -14
- package/__inner__/esm/components/Segment/Segment.js +1 -1
- package/__inner__/esm/components/Segment/components/SegmentItem/SegmentItem.js +1 -1
- package/__inner__/esm/components/Select/Select.css +6 -0
- package/__inner__/esm/components/Select/Select.js +42 -60
- package/__inner__/esm/components/Select/components/SelectInput/SelectInput.js +5 -6
- package/__inner__/esm/components/Select/components/SelectInputContextConsumer/SelectInputContextConsumer.d.ts +5 -0
- package/__inner__/esm/components/Select/components/{SelectConsumer/SelectInputConsumer.js → SelectInputContextConsumer/SelectInputContextConsumer.js} +1 -1
- package/__inner__/esm/components/Select/components/SelectInputContextConsumer/index.d.ts +1 -0
- package/__inner__/esm/components/Select/components/SelectInputContextConsumer/index.js +1 -0
- package/__inner__/esm/components/Select/helpers/types.d.ts +5 -8
- package/__inner__/esm/components/Select/helpers/types.js +2 -0
- package/__inner__/esm/components/Select/types.d.ts +43 -41
- package/__inner__/esm/components/Stack/types.d.ts +2 -2
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_bBusinessDark.css +15 -15
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_bBusinessDefault.css +20 -20
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDark.css +15 -15
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_ozenDefault.css +20 -20
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_vipDark.css +15 -15
- package/__inner__/esm/components/ThemeProvider/_color/Theme_color_vipDefault.css +20 -20
- package/__inner__/esm/components/ThemeProvider/index.d.ts +2 -0
- package/__inner__/esm/components/ThemeProvider/index.js +2 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeVipDark.d.ts +14 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeVipDark.js +27 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeVipDefault.d.ts +14 -0
- package/__inner__/esm/components/ThemeProvider/themes/themeVipDefault.js +27 -0
- package/package.json +4 -4
- package/__inner__/cjs/components/Select/components/SelectConsumer/SelectInputConsumer.d.ts +0 -5
- package/__inner__/cjs/components/Select/components/SelectConsumer/index.d.ts +0 -1
- package/__inner__/esm/components/Select/components/SelectConsumer/SelectInputConsumer.d.ts +0 -5
- package/__inner__/esm/components/Select/components/SelectConsumer/index.d.ts +0 -1
- package/__inner__/esm/components/Select/components/SelectConsumer/index.js +0 -1
|
@@ -4,31 +4,31 @@
|
|
|
4
4
|
--color-content-tertiary: #7e8194;
|
|
5
5
|
--color-content-disabled: #9a9eb5;
|
|
6
6
|
--color-content-ghost-disabled: rgb(255 255 255 / 40%);
|
|
7
|
-
--color-content-action: #
|
|
8
|
-
--color-content-action-hover: #
|
|
9
|
-
--color-content-action-pressed: #
|
|
10
|
-
--color-content-action-dark: #
|
|
7
|
+
--color-content-action: #039904;
|
|
8
|
+
--color-content-action-hover: #067607;
|
|
9
|
+
--color-content-action-pressed: #0a540b;
|
|
10
|
+
--color-content-action-dark: #0d310e;
|
|
11
11
|
--color-content-action-secondary: #2c2c33;
|
|
12
12
|
--color-content-action-secondary-hover: #1e1d22;
|
|
13
13
|
--color-content-action-secondary-pressed: #17161a;
|
|
14
14
|
--color-content-action-secondary-dark: #17161a;
|
|
15
15
|
--color-content-action-on: #fff;
|
|
16
|
-
--color-content-error: #
|
|
17
|
-
--color-content-error-hover: #
|
|
18
|
-
--color-content-error-pressed: #
|
|
19
|
-
--color-content-error-dark: #
|
|
20
|
-
--color-content-warning: #
|
|
21
|
-
--color-content-warning-hover: #
|
|
22
|
-
--color-content-warning-pressed: #
|
|
23
|
-
--color-content-warning-dark: #
|
|
24
|
-
--color-content-success: #
|
|
25
|
-
--color-content-success-hover: #
|
|
26
|
-
--color-content-success-pressed: #
|
|
27
|
-
--color-content-success-dark: #
|
|
28
|
-
--color-content-info: #
|
|
29
|
-
--color-content-info-hover: #
|
|
30
|
-
--color-content-info-pressed: #
|
|
31
|
-
--color-content-info-dark: #
|
|
16
|
+
--color-content-error: #cf4a4b;
|
|
17
|
+
--color-content-error-hover: #9f3b3d;
|
|
18
|
+
--color-content-error-pressed: #702d2e;
|
|
19
|
+
--color-content-error-dark: #401e20;
|
|
20
|
+
--color-content-warning: #cf8d2a;
|
|
21
|
+
--color-content-warning-hover: #9f6d24;
|
|
22
|
+
--color-content-warning-pressed: #704e1e;
|
|
23
|
+
--color-content-warning-dark: #402e18;
|
|
24
|
+
--color-content-success: #039904;
|
|
25
|
+
--color-content-success-hover: #067607;
|
|
26
|
+
--color-content-success-pressed: #0a540b;
|
|
27
|
+
--color-content-success-dark: #0d310e;
|
|
28
|
+
--color-content-info: #0534d0;
|
|
29
|
+
--color-content-info-hover: #082ba0;
|
|
30
|
+
--color-content-info-pressed: #0a2171;
|
|
31
|
+
--color-content-info-dark: #0d1841;
|
|
32
32
|
--color-content-primary-inverse: #fff;
|
|
33
33
|
--color-content-accent-secondary: #989aa5;
|
|
34
34
|
--color-accent-main: #14151b;
|
|
@@ -53,9 +53,9 @@
|
|
|
53
53
|
--color-background-action-hover: #d4aa6b;
|
|
54
54
|
--color-background-action-pressed: #db8;
|
|
55
55
|
--color-background-action-active-disabled: #5f4d36;
|
|
56
|
-
--color-background-action-light: #
|
|
57
|
-
--color-background-action-light-hover: #
|
|
58
|
-
--color-background-action-light-pressed: #
|
|
56
|
+
--color-background-action-light: #372e24;
|
|
57
|
+
--color-background-action-light-hover: #5f4d36;
|
|
58
|
+
--color-background-action-light-pressed: #866c47;
|
|
59
59
|
--color-background-accent-action-light: #5f4d36;
|
|
60
60
|
--color-background-accent-action-light-hover: #866c47;
|
|
61
61
|
--color-background-accent-action-light-pressed: #ad8b59;
|
|
@@ -72,36 +72,36 @@
|
|
|
72
72
|
--color-background-error: #c85390;
|
|
73
73
|
--color-background-error-hover: #f664af;
|
|
74
74
|
--color-background-error-pressed: #f883bf;
|
|
75
|
-
--color-background-error-light: #
|
|
76
|
-
--color-background-error-light-hover: #
|
|
77
|
-
--color-background-error-light-pressed: #
|
|
75
|
+
--color-background-error-light: #3e2031;
|
|
76
|
+
--color-background-error-light-hover: #6c3151;
|
|
77
|
+
--color-background-error-light-pressed: #9a4270;
|
|
78
78
|
--color-background-accent-error-light: #6c3151;
|
|
79
79
|
--color-background-accent-error-light-hover: #9a4270;
|
|
80
80
|
--color-background-accent-error-light-pressed: #c85390;
|
|
81
81
|
--color-background-warning: #cf6944;
|
|
82
82
|
--color-background-warning-hover: #ff7f50;
|
|
83
83
|
--color-background-warning-pressed: #ff9973;
|
|
84
|
-
--color-background-warning-light: #
|
|
85
|
-
--color-background-warning-light-hover: #
|
|
86
|
-
--color-background-warning-light-pressed: #
|
|
84
|
+
--color-background-warning-light: #40251e;
|
|
85
|
+
--color-background-warning-light-hover: #703c2b;
|
|
86
|
+
--color-background-warning-light-pressed: #9f5237;
|
|
87
87
|
--color-background-accent-warning-light: #703c2b;
|
|
88
88
|
--color-background-accent-warning-light-hover: #9f5237;
|
|
89
89
|
--color-background-accent-warning-light-pressed: #cf6944;
|
|
90
90
|
--color-background-success: #039904;
|
|
91
91
|
--color-background-success-hover: #0b0;
|
|
92
92
|
--color-background-success-pressed: #33c933;
|
|
93
|
-
--color-background-success-light: #
|
|
94
|
-
--color-background-success-light-hover: #
|
|
95
|
-
--color-background-success-light-pressed: #
|
|
93
|
+
--color-background-success-light: #0d310e;
|
|
94
|
+
--color-background-success-light-hover: #0a540b;
|
|
95
|
+
--color-background-success-light-pressed: #067607;
|
|
96
96
|
--color-background-accent-success-light: #0a540b;
|
|
97
97
|
--color-background-accent-success-light-hover: #067607;
|
|
98
98
|
--color-background-accent-success-light-pressed: #039904;
|
|
99
99
|
--color-background-info: #0534d0;
|
|
100
100
|
--color-background-info-hover: #023dff;
|
|
101
101
|
--color-background-info-pressed: #3564ff;
|
|
102
|
-
--color-background-info-light: #
|
|
103
|
-
--color-background-info-light-hover: #
|
|
104
|
-
--color-background-info-light-pressed: #
|
|
102
|
+
--color-background-info-light: #0d1841;
|
|
103
|
+
--color-background-info-light-hover: #0a2171;
|
|
104
|
+
--color-background-info-light-pressed: #082ba0;
|
|
105
105
|
--color-background-accent-info-light: #0a2171;
|
|
106
106
|
--color-background-accent-info-light-hover: #082ba0;
|
|
107
107
|
--color-background-accent-info-light-pressed: #0534d0;
|
|
@@ -4,31 +4,31 @@
|
|
|
4
4
|
--color-content-tertiary: #7e8194;
|
|
5
5
|
--color-content-disabled: #9a9eb5;
|
|
6
6
|
--color-content-ghost-disabled: rgb(255 255 255 / 40%);
|
|
7
|
-
--color-content-action: #
|
|
8
|
-
--color-content-action-hover: #
|
|
9
|
-
--color-content-action-pressed: #
|
|
10
|
-
--color-content-action-dark: #
|
|
7
|
+
--color-content-action: #ad8b59;
|
|
8
|
+
--color-content-action-hover: #866c47;
|
|
9
|
+
--color-content-action-pressed: #5f4d36;
|
|
10
|
+
--color-content-action-dark: #372e24;
|
|
11
11
|
--color-content-action-secondary: #2c2c33;
|
|
12
12
|
--color-content-action-secondary-hover: #1e1d22;
|
|
13
13
|
--color-content-action-secondary-pressed: #17161a;
|
|
14
14
|
--color-content-action-secondary-dark: #17161a;
|
|
15
15
|
--color-content-action-on: #fff;
|
|
16
|
-
--color-content-error: #
|
|
17
|
-
--color-content-error-hover: #
|
|
18
|
-
--color-content-error-pressed: #
|
|
19
|
-
--color-content-error-dark: #
|
|
20
|
-
--color-content-warning: #
|
|
21
|
-
--color-content-warning-hover: #
|
|
22
|
-
--color-content-warning-pressed: #
|
|
23
|
-
--color-content-warning-dark: #
|
|
24
|
-
--color-content-success: #
|
|
25
|
-
--color-content-success-hover: #
|
|
26
|
-
--color-content-success-pressed: #
|
|
27
|
-
--color-content-success-dark: #
|
|
28
|
-
--color-content-info: #
|
|
29
|
-
--color-content-info-hover: #
|
|
30
|
-
--color-content-info-pressed: #
|
|
31
|
-
--color-content-info-dark: #
|
|
16
|
+
--color-content-error: #c85390;
|
|
17
|
+
--color-content-error-hover: #9a4270;
|
|
18
|
+
--color-content-error-pressed: #6c3151;
|
|
19
|
+
--color-content-error-dark: #3e2031;
|
|
20
|
+
--color-content-warning: #cf6944;
|
|
21
|
+
--color-content-warning-hover: #9f5237;
|
|
22
|
+
--color-content-warning-pressed: #703c2b;
|
|
23
|
+
--color-content-warning-dark: #40251e;
|
|
24
|
+
--color-content-success: #039904;
|
|
25
|
+
--color-content-success-hover: #067607;
|
|
26
|
+
--color-content-success-pressed: #0a540b;
|
|
27
|
+
--color-content-success-dark: #0d310e;
|
|
28
|
+
--color-content-info: #0534d0;
|
|
29
|
+
--color-content-info-hover: #082ba0;
|
|
30
|
+
--color-content-info-pressed: #0a2171;
|
|
31
|
+
--color-content-info-dark: #0d1841;
|
|
32
32
|
--color-content-primary-inverse: #fff;
|
|
33
33
|
--color-content-accent-secondary: #989aa5;
|
|
34
34
|
--color-accent-main: #14151b;
|
|
@@ -3,6 +3,8 @@ export * from './themes/themeOzenDark';
|
|
|
3
3
|
export * from './themes/themeOzenDefault';
|
|
4
4
|
export * from './themes/themeBBusinessDefault';
|
|
5
5
|
export * from './themes/themeBBusinessDark';
|
|
6
|
+
export * from './themes/themeVipDefault';
|
|
7
|
+
export * from './themes/themeVipDark';
|
|
6
8
|
export * as themeHelper from './themes/helper';
|
|
7
9
|
export { useTheme } from './ThemeProviderContext';
|
|
8
10
|
export * from './utils';
|
|
@@ -7,6 +7,8 @@ tslib_1.__exportStar(require("./themes/themeOzenDark"), exports);
|
|
|
7
7
|
tslib_1.__exportStar(require("./themes/themeOzenDefault"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./themes/themeBBusinessDefault"), exports);
|
|
9
9
|
tslib_1.__exportStar(require("./themes/themeBBusinessDark"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./themes/themeVipDefault"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./themes/themeVipDark"), exports);
|
|
10
12
|
exports.themeHelper = tslib_1.__importStar(require("./themes/helper"));
|
|
11
13
|
var ThemeProviderContext_1 = require("./ThemeProviderContext");
|
|
12
14
|
Object.defineProperty(exports, "useTheme", { enumerable: true, get: function () { return ThemeProviderContext_1.useTheme; } });
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '@ozen-ui/fonts';
|
|
2
|
+
import type { Theme } from '../index';
|
|
3
|
+
import '../_color/Theme_color_vipDark.css';
|
|
4
|
+
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
|
+
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
|
+
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
9
|
+
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
10
|
+
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
11
|
+
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
12
|
+
import '../_zIndex/Theme_zIndex_ozenDefault.css';
|
|
13
|
+
import '../_transition/Theme_transition_ozenDefault.css';
|
|
14
|
+
export declare const themeVipDark: Theme;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.themeVipDark = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
require("@ozen-ui/fonts");
|
|
6
|
+
var locale_1 = require("../../../locale");
|
|
7
|
+
require("../_color/Theme_color_vipDark.css");
|
|
8
|
+
require("../_typography/Theme_typography_ozenDefault.css");
|
|
9
|
+
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
10
|
+
require("../_space/Theme_space_ozenDefault.css");
|
|
11
|
+
require("../_spacing/Theme_spacing_ozenDefault.css");
|
|
12
|
+
require("../_control/Theme_control_ozenDefault.css");
|
|
13
|
+
require("../_shadow/Theme_shadow_ozenDefault.css");
|
|
14
|
+
require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
15
|
+
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
16
|
+
require("../_zIndex/Theme_zIndex_ozenDefault.css");
|
|
17
|
+
require("../_transition/Theme_transition_ozenDefault.css");
|
|
18
|
+
exports.themeVipDark = tslib_1.__assign({ tokens: {
|
|
19
|
+
color: 'vipDark',
|
|
20
|
+
space: 'ozenDefault',
|
|
21
|
+
spacing: 'ozenDefault',
|
|
22
|
+
control: 'ozenDefault',
|
|
23
|
+
typography: 'ozenDefault',
|
|
24
|
+
borderRadius: 'ozenDefault',
|
|
25
|
+
borderWidth: 'ozenDefault',
|
|
26
|
+
shadow: 'ozenDefault',
|
|
27
|
+
breakpoint: 'ozenDefault',
|
|
28
|
+
zIndex: 'ozenDefault',
|
|
29
|
+
transition: 'ozenDefault',
|
|
30
|
+
} }, locale_1.ruRU);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import '@ozen-ui/fonts';
|
|
2
|
+
import type { Theme } from '../index';
|
|
3
|
+
import '../_color/Theme_color_vipDefault.css';
|
|
4
|
+
import '../_typography/Theme_typography_ozenDefault.css';
|
|
5
|
+
import '../_borderRadius/Theme_borderRadius_ozenDefault.css';
|
|
6
|
+
import '../_space/Theme_space_ozenDefault.css';
|
|
7
|
+
import '../_spacing/Theme_spacing_ozenDefault.css';
|
|
8
|
+
import '../_control/Theme_control_ozenDefault.css';
|
|
9
|
+
import '../_shadow/Theme_shadow_ozenDefault.css';
|
|
10
|
+
import '../_breakpoint/Theme_breakpoint_ozenDefault.css';
|
|
11
|
+
import '../_borderWidth/Theme_borderWidth_ozenDefault.css';
|
|
12
|
+
import '../_zIndex/Theme_zIndex_ozenDefault.css';
|
|
13
|
+
import '../_transition/Theme_transition_ozenDefault.css';
|
|
14
|
+
export declare const themeVipDefault: Theme;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.themeVipDefault = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
require("@ozen-ui/fonts");
|
|
6
|
+
var locale_1 = require("../../../locale");
|
|
7
|
+
require("../_color/Theme_color_vipDefault.css");
|
|
8
|
+
require("../_typography/Theme_typography_ozenDefault.css");
|
|
9
|
+
require("../_borderRadius/Theme_borderRadius_ozenDefault.css");
|
|
10
|
+
require("../_space/Theme_space_ozenDefault.css");
|
|
11
|
+
require("../_spacing/Theme_spacing_ozenDefault.css");
|
|
12
|
+
require("../_control/Theme_control_ozenDefault.css");
|
|
13
|
+
require("../_shadow/Theme_shadow_ozenDefault.css");
|
|
14
|
+
require("../_breakpoint/Theme_breakpoint_ozenDefault.css");
|
|
15
|
+
require("../_borderWidth/Theme_borderWidth_ozenDefault.css");
|
|
16
|
+
require("../_zIndex/Theme_zIndex_ozenDefault.css");
|
|
17
|
+
require("../_transition/Theme_transition_ozenDefault.css");
|
|
18
|
+
exports.themeVipDefault = tslib_1.__assign({ tokens: {
|
|
19
|
+
color: 'vipDefault',
|
|
20
|
+
space: 'ozenDefault',
|
|
21
|
+
spacing: 'ozenDefault',
|
|
22
|
+
control: 'ozenDefault',
|
|
23
|
+
typography: 'ozenDefault',
|
|
24
|
+
borderRadius: 'ozenDefault',
|
|
25
|
+
borderWidth: 'ozenDefault',
|
|
26
|
+
shadow: 'ozenDefault',
|
|
27
|
+
breakpoint: 'ozenDefault',
|
|
28
|
+
zIndex: 'ozenDefault',
|
|
29
|
+
transition: 'ozenDefault',
|
|
30
|
+
} }, locale_1.ruRU);
|
|
@@ -2,76 +2,13 @@ import type { AutocompleteDefaultOption, AutocompletePropGetOptionDisabled, Auto
|
|
|
2
2
|
export declare const defaultGetOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption>;
|
|
3
3
|
export declare const defaultGetOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption>;
|
|
4
4
|
export declare const defaultGetOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption>;
|
|
5
|
-
export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTION>):
|
|
5
|
+
export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTION>): {
|
|
6
6
|
options: OPTION[];
|
|
7
7
|
size?: import("../../types/FormElementSizeVariant").FormElementSizeVariant;
|
|
8
8
|
value?: import("./types").AutocompletePropValue<OPTION>;
|
|
9
9
|
defaultValue?: import("./types").AutocompletePropValue<OPTION>;
|
|
10
|
-
onChange?: ((e: import("react").SyntheticEvent | KeyboardEvent, value: OPTION | null) => void) | undefined;
|
|
11
|
-
inputValue?: string;
|
|
12
|
-
onInputChange?: (e: import("react").ChangeEvent<HTMLInputElement> | null, value: string) => void;
|
|
13
|
-
renderInput?: import("./types").AutocompleteRenderInput;
|
|
14
|
-
renderOption?: import("./types").AutocompletePropRenderOption<OPTION> | undefined;
|
|
15
|
-
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined;
|
|
16
|
-
getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined;
|
|
17
|
-
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined;
|
|
18
|
-
disableCloseOnSelect?: boolean;
|
|
19
|
-
allowCustomValue?: boolean;
|
|
20
|
-
loading?: boolean;
|
|
21
|
-
noOptionsText?: import("react").ReactNode;
|
|
22
|
-
clearText?: string;
|
|
23
|
-
openText?: string;
|
|
24
|
-
closeText?: string;
|
|
25
|
-
loadingText?: import("react").ReactNode;
|
|
26
|
-
onClose?: () => void;
|
|
27
|
-
onOpen?: () => void;
|
|
28
|
-
disableClearButton?: boolean;
|
|
29
|
-
searchFunction?: import("./types").AutocompleteSearchFunction<OPTION> | undefined;
|
|
30
|
-
disableShowEmptyOptionsList?: boolean;
|
|
31
|
-
disableShowChevron?: boolean;
|
|
32
|
-
dataListProps?: Partial<Omit<import("../DataList").DataListProps, "onSelect" | "open" | "onClose" | "multiple" | "selected" | "anchorRef">>;
|
|
33
|
-
} & {
|
|
34
|
-
error?: boolean | undefined;
|
|
35
|
-
label?: string | undefined;
|
|
36
|
-
style?: import("react").CSSProperties | undefined;
|
|
37
|
-
className?: string | undefined;
|
|
38
|
-
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
39
|
-
autoFocus?: boolean | undefined;
|
|
40
|
-
disabled?: boolean | undefined;
|
|
41
|
-
placeholder?: string | undefined;
|
|
42
|
-
required?: boolean | undefined;
|
|
43
|
-
fullWidth?: boolean | undefined;
|
|
44
|
-
disableStroke?: boolean | undefined;
|
|
45
|
-
hint?: string | null | undefined;
|
|
46
|
-
renderLeft?: import("../FieldIcon").FieldIconProps["icon"];
|
|
47
|
-
renderRight?: import("../FieldIcon").FieldIconProps["icon"];
|
|
48
|
-
inputProps?: import("../FieldInput").FieldInputProps | undefined;
|
|
49
|
-
bodyProps?: import("react").ComponentPropsWithRef<"label"> | undefined;
|
|
50
|
-
hintProps?: Omit<import("../FieldHint").FieldHintProps, "children"> | undefined;
|
|
51
|
-
} & {
|
|
52
10
|
open?: boolean;
|
|
53
|
-
defaultOpen?:
|
|
54
|
-
} & (OPTION extends {
|
|
55
|
-
label: AutocompleteDefaultOption["label"];
|
|
56
|
-
} ? Record<string, unknown> : {
|
|
57
|
-
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined;
|
|
58
|
-
}) & (OPTION extends {
|
|
59
|
-
id: AutocompleteDefaultOption["id"];
|
|
60
|
-
} ? Record<string, unknown> : {
|
|
61
|
-
getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined;
|
|
62
|
-
}) & (OPTION extends {
|
|
63
|
-
disabled: AutocompleteDefaultOption["disabled"];
|
|
64
|
-
} ? Record<string, unknown> : {
|
|
65
|
-
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined;
|
|
66
|
-
}) & {
|
|
67
|
-
getOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption> | AutocompletePropGetOptionLabel<OPTION>;
|
|
68
|
-
getOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption> | AutocompletePropGetOptionKey<OPTION>;
|
|
69
|
-
getOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption> | AutocompletePropGetOptionDisabled<OPTION>;
|
|
70
|
-
}) | ({
|
|
71
|
-
options: OPTION[];
|
|
72
|
-
size?: import("../../types/FormElementSizeVariant").FormElementSizeVariant;
|
|
73
|
-
value?: import("./types").AutocompletePropValue<OPTION>;
|
|
74
|
-
defaultValue?: import("./types").AutocompletePropValue<OPTION>;
|
|
11
|
+
defaultOpen?: boolean;
|
|
75
12
|
onChange?: ((e: import("react").SyntheticEvent | KeyboardEvent, value: OPTION | null) => void) | undefined;
|
|
76
13
|
inputValue?: string;
|
|
77
14
|
onInputChange?: (e: import("react").ChangeEvent<HTMLInputElement> | null, value: string) => void;
|
|
@@ -95,6 +32,7 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
|
|
|
95
32
|
disableShowEmptyOptionsList?: boolean;
|
|
96
33
|
disableShowChevron?: boolean;
|
|
97
34
|
dataListProps?: Partial<Omit<import("../DataList").DataListProps, "onSelect" | "open" | "onClose" | "multiple" | "selected" | "anchorRef">>;
|
|
35
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
98
36
|
} & {
|
|
99
37
|
error?: boolean | undefined;
|
|
100
38
|
label?: string | undefined;
|
|
@@ -113,23 +51,20 @@ export declare function withDefaultGetters<OPTION>(props: AutocompleteProps<OPTI
|
|
|
113
51
|
inputProps?: import("../FieldInput").FieldInputProps | undefined;
|
|
114
52
|
bodyProps?: import("react").ComponentPropsWithRef<"label"> | undefined;
|
|
115
53
|
hintProps?: Omit<import("../FieldHint").FieldHintProps, "children"> | undefined;
|
|
116
|
-
} & {
|
|
117
|
-
open?: never;
|
|
118
|
-
defaultOpen?: boolean;
|
|
119
54
|
} & (OPTION extends {
|
|
120
55
|
label: AutocompleteDefaultOption["label"];
|
|
121
|
-
} ?
|
|
56
|
+
} ? object : {
|
|
122
57
|
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined;
|
|
123
58
|
}) & (OPTION extends {
|
|
124
59
|
id: AutocompleteDefaultOption["id"];
|
|
125
|
-
} ?
|
|
60
|
+
} ? object : {
|
|
126
61
|
getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined;
|
|
127
62
|
}) & (OPTION extends {
|
|
128
63
|
disabled: AutocompleteDefaultOption["disabled"];
|
|
129
|
-
} ?
|
|
64
|
+
} ? object : {
|
|
130
65
|
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined;
|
|
131
66
|
}) & {
|
|
132
67
|
getOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption> | AutocompletePropGetOptionLabel<OPTION>;
|
|
133
68
|
getOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption> | AutocompletePropGetOptionKey<OPTION>;
|
|
134
69
|
getOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption> | AutocompletePropGetOptionDisabled<OPTION>;
|
|
135
|
-
}
|
|
70
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ChangeEvent, ReactElement, ReactNode, SyntheticEvent } from 'react';
|
|
1
|
+
import type { ChangeEvent, ReactElement, ReactNode, Ref, SyntheticEvent } from 'react';
|
|
2
2
|
import type { FormElementSizeVariant } from '../../types/FormElementSizeVariant';
|
|
3
3
|
import type { DataListProps } from '../DataList';
|
|
4
4
|
import type { InputProps } from '../Input';
|
|
@@ -18,18 +18,6 @@ export type AutocompleteDefaultOption = {
|
|
|
18
18
|
};
|
|
19
19
|
export type AutocompleteSearchFunction<OPTION> = (options: OPTION[], searchValue: string) => OPTION[];
|
|
20
20
|
export type AutocompleteRenderInput = (props: InputProps) => ReactNode;
|
|
21
|
-
type AutocompleteOpenControlledProps = {
|
|
22
|
-
/** Текущее состояние списка. Если `true`, список отображается. */
|
|
23
|
-
open?: boolean;
|
|
24
|
-
/** Состояние открытие по умолчанию (неконтролируемый компонент) */
|
|
25
|
-
defaultOpen?: never;
|
|
26
|
-
};
|
|
27
|
-
type AutocompleteOpenUncontrolledProps = {
|
|
28
|
-
/** Текущее состояние списка. Если `true`, список отображается. */
|
|
29
|
-
open?: never;
|
|
30
|
-
/** Состояние открытие по умолчанию (неконтролируемый компонент) */
|
|
31
|
-
defaultOpen?: boolean;
|
|
32
|
-
};
|
|
33
21
|
type AutocompleteInputProps = Pick<InputProps, 'placeholder' | 'autoFocus' | 'fullWidth' | 'disabled' | 'label' | 'required' | 'disableStroke' | 'style' | 'error' | 'hint' | 'renderLeft' | 'renderRight' | 'className' | 'inputProps' | 'hintProps' | 'bodyProps' | 'onKeyDown'>;
|
|
34
22
|
type AutocompleteDataListProps = Partial<Omit<DataListProps, 'onClose' | 'open' | 'anchorRef' | 'multiple' | 'selected' | 'onSelect'>>;
|
|
35
23
|
export type AutocompleteProps<OPTION = AutocompleteDefaultOption> = {
|
|
@@ -41,6 +29,10 @@ export type AutocompleteProps<OPTION = AutocompleteDefaultOption> = {
|
|
|
41
29
|
value?: AutocompletePropValue<OPTION>;
|
|
42
30
|
/** Выбранное значение опции по умолчанию */
|
|
43
31
|
defaultValue?: AutocompletePropValue<OPTION>;
|
|
32
|
+
/** Текущее состояние списка. Если `true`, список отображается. */
|
|
33
|
+
open?: boolean;
|
|
34
|
+
/** Состояние открытие по умолчанию (неконтролируемый компонент) */
|
|
35
|
+
defaultOpen?: boolean;
|
|
44
36
|
/** Функция обратного вызова, которая будет вызвана при выборе значения */
|
|
45
37
|
onChange?: (e: SyntheticEvent | KeyboardEvent, value: OPTION | null) => void;
|
|
46
38
|
/** Введённое значение в текстовом поле */
|
|
@@ -87,17 +79,19 @@ export type AutocompleteProps<OPTION = AutocompleteDefaultOption> = {
|
|
|
87
79
|
disableShowChevron?: boolean;
|
|
88
80
|
/** Свойства компонента DataList */
|
|
89
81
|
dataListProps?: AutocompleteDataListProps;
|
|
90
|
-
|
|
82
|
+
/** Ссылка на HTML элемент */
|
|
83
|
+
ref?: Ref<HTMLDivElement>;
|
|
84
|
+
} & AutocompleteInputProps & (OPTION extends {
|
|
91
85
|
label: AutocompleteDefaultOption['label'];
|
|
92
|
-
} ?
|
|
86
|
+
} ? object : {
|
|
93
87
|
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION>;
|
|
94
88
|
}) & (OPTION extends {
|
|
95
89
|
id: AutocompleteDefaultOption['id'];
|
|
96
|
-
} ?
|
|
90
|
+
} ? object : {
|
|
97
91
|
getOptionKey?: AutocompletePropGetOptionKey<OPTION>;
|
|
98
92
|
}) & (OPTION extends {
|
|
99
93
|
disabled: AutocompleteDefaultOption['disabled'];
|
|
100
|
-
} ?
|
|
94
|
+
} ? object : {
|
|
101
95
|
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION>;
|
|
102
96
|
});
|
|
103
97
|
export type AutocompleteComponent = <OPTION = AutocompleteDefaultOption>(props: AutocompleteProps<OPTION>) => ReactElement | null;
|
|
@@ -2,7 +2,7 @@ import type { AutocompleteDefaultOption, AutocompletePropGetOptionDisabled, Auto
|
|
|
2
2
|
export declare const defaultGetOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption>;
|
|
3
3
|
export declare const defaultGetOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption>;
|
|
4
4
|
export declare const defaultGetOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption>;
|
|
5
|
-
export declare function withDefaultGetters<OPTION = AutocompleteDefaultOption, MULTIPLE extends boolean = false>(props: AutocompleteProps<OPTION, MULTIPLE>):
|
|
5
|
+
export declare function withDefaultGetters<OPTION = AutocompleteDefaultOption, MULTIPLE extends boolean = false>(props: AutocompleteProps<OPTION, MULTIPLE>): {
|
|
6
6
|
multiple?: MULTIPLE | undefined;
|
|
7
7
|
limitTags?: number | "responsive";
|
|
8
8
|
renderTag?: import("./types").AutocompletePropRenderTag;
|
|
@@ -11,76 +11,8 @@ export declare function withDefaultGetters<OPTION = AutocompleteDefaultOption, M
|
|
|
11
11
|
size?: import("./types").AutocompletePropSize;
|
|
12
12
|
value?: import("./types").AutocompletePropValue<OPTION, MULTIPLE>;
|
|
13
13
|
defaultValue?: import("./types").AutocompletePropValue<OPTION, MULTIPLE>;
|
|
14
|
-
onChange?: import("./types").AutocompleteOnChange<OPTION, MULTIPLE> | undefined;
|
|
15
|
-
inputValue?: string;
|
|
16
|
-
onInputChange?: import("./types").AutocompleteOnInputChange;
|
|
17
|
-
renderInput?: import("./types").AutocompletePropRenderInput;
|
|
18
|
-
renderOption?: import("./types").AutocompletePropRenderOption<OPTION> | undefined;
|
|
19
|
-
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined;
|
|
20
|
-
getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined;
|
|
21
|
-
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined;
|
|
22
|
-
disableCloseOnSelect?: boolean;
|
|
23
|
-
allowCustomValue?: boolean;
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
noOptionsText?: import("react").ReactNode;
|
|
26
|
-
clearText?: string;
|
|
27
|
-
openText?: string;
|
|
28
|
-
closeText?: string;
|
|
29
|
-
loadingText?: import("react").ReactNode;
|
|
30
|
-
onClose?(): void;
|
|
31
|
-
onOpen?(): void;
|
|
32
|
-
disableClearButton?: boolean;
|
|
33
|
-
searchFunction?: import("./types").AutocompletePropSearchFunction<OPTION> | undefined;
|
|
34
|
-
disableShowEmptyOptionsList?: boolean;
|
|
35
|
-
disableShowChevron?: boolean;
|
|
36
|
-
popoverProps?: import("./components").AutocompleteDropdownProps["popoverProps"];
|
|
37
|
-
listProps?: import("./components").AutocompleteDropdownProps["listProps"];
|
|
38
|
-
} & {
|
|
39
|
-
error?: boolean | undefined;
|
|
40
|
-
label?: string | undefined;
|
|
41
|
-
style?: import("react").CSSProperties | undefined;
|
|
42
|
-
className?: string | undefined;
|
|
43
|
-
onKeyDown?: import("react").KeyboardEventHandler<HTMLDivElement> | undefined;
|
|
44
|
-
autoFocus?: boolean | undefined;
|
|
45
|
-
disabled?: boolean | undefined;
|
|
46
|
-
placeholder?: string | undefined;
|
|
47
|
-
required?: boolean | undefined;
|
|
48
|
-
fullWidth?: boolean | undefined;
|
|
49
|
-
disableStroke?: boolean | undefined;
|
|
50
|
-
hint?: string | null | undefined;
|
|
51
|
-
renderLeft?: import("../FieldIcon").FieldIconProps["icon"];
|
|
52
|
-
renderRight?: import("../FieldIcon").FieldIconProps["icon"];
|
|
53
|
-
inputProps?: import("../FieldInput").FieldInputProps | undefined;
|
|
54
|
-
bodyProps?: import("react").ComponentPropsWithRef<"label"> | undefined;
|
|
55
|
-
hintProps?: Omit<import("../FieldHint").FieldHintProps, "children"> | undefined;
|
|
56
|
-
} & {
|
|
57
14
|
open?: boolean;
|
|
58
|
-
defaultOpen?:
|
|
59
|
-
} & (OPTION extends {
|
|
60
|
-
label: AutocompleteDefaultOption["label"];
|
|
61
|
-
} ? Record<string, unknown> : {
|
|
62
|
-
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined;
|
|
63
|
-
}) & (OPTION extends {
|
|
64
|
-
id: AutocompleteDefaultOption["id"];
|
|
65
|
-
} ? Record<string, unknown> : {
|
|
66
|
-
getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined;
|
|
67
|
-
}) & (OPTION extends {
|
|
68
|
-
disabled: AutocompleteDefaultOption["disabled"];
|
|
69
|
-
} ? Record<string, unknown> : {
|
|
70
|
-
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined;
|
|
71
|
-
}) & {
|
|
72
|
-
getOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption> | AutocompletePropGetOptionLabel<OPTION>;
|
|
73
|
-
getOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption> | AutocompletePropGetOptionKey<OPTION>;
|
|
74
|
-
getOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption> | AutocompletePropGetOptionDisabled<OPTION>;
|
|
75
|
-
}) | ({
|
|
76
|
-
multiple?: MULTIPLE | undefined;
|
|
77
|
-
limitTags?: number | "responsive";
|
|
78
|
-
renderTag?: import("./types").AutocompletePropRenderTag;
|
|
79
|
-
renderMoreTag?: import("./types").AutocompletePropRenderMoreTag<OPTION> | undefined;
|
|
80
|
-
options: OPTION[];
|
|
81
|
-
size?: import("./types").AutocompletePropSize;
|
|
82
|
-
value?: import("./types").AutocompletePropValue<OPTION, MULTIPLE>;
|
|
83
|
-
defaultValue?: import("./types").AutocompletePropValue<OPTION, MULTIPLE>;
|
|
15
|
+
defaultOpen?: boolean;
|
|
84
16
|
onChange?: import("./types").AutocompleteOnChange<OPTION, MULTIPLE> | undefined;
|
|
85
17
|
inputValue?: string;
|
|
86
18
|
onInputChange?: import("./types").AutocompleteOnInputChange;
|
|
@@ -105,6 +37,7 @@ export declare function withDefaultGetters<OPTION = AutocompleteDefaultOption, M
|
|
|
105
37
|
disableShowChevron?: boolean;
|
|
106
38
|
popoverProps?: import("./components").AutocompleteDropdownProps["popoverProps"];
|
|
107
39
|
listProps?: import("./components").AutocompleteDropdownProps["listProps"];
|
|
40
|
+
ref?: import("react").Ref<HTMLDivElement>;
|
|
108
41
|
} & {
|
|
109
42
|
error?: boolean | undefined;
|
|
110
43
|
label?: string | undefined;
|
|
@@ -123,25 +56,22 @@ export declare function withDefaultGetters<OPTION = AutocompleteDefaultOption, M
|
|
|
123
56
|
inputProps?: import("../FieldInput").FieldInputProps | undefined;
|
|
124
57
|
bodyProps?: import("react").ComponentPropsWithRef<"label"> | undefined;
|
|
125
58
|
hintProps?: Omit<import("../FieldHint").FieldHintProps, "children"> | undefined;
|
|
126
|
-
} & {
|
|
127
|
-
open?: never;
|
|
128
|
-
defaultOpen?: boolean;
|
|
129
59
|
} & (OPTION extends {
|
|
130
60
|
label: AutocompleteDefaultOption["label"];
|
|
131
|
-
} ?
|
|
61
|
+
} ? object : {
|
|
132
62
|
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION> | undefined;
|
|
133
63
|
}) & (OPTION extends {
|
|
134
64
|
id: AutocompleteDefaultOption["id"];
|
|
135
|
-
} ?
|
|
65
|
+
} ? object : {
|
|
136
66
|
getOptionKey?: AutocompletePropGetOptionKey<OPTION> | undefined;
|
|
137
67
|
}) & (OPTION extends {
|
|
138
68
|
disabled: AutocompleteDefaultOption["disabled"];
|
|
139
|
-
} ?
|
|
69
|
+
} ? object : {
|
|
140
70
|
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION> | undefined;
|
|
141
71
|
}) & {
|
|
142
72
|
getOptionLabel: AutocompletePropGetOptionLabel<AutocompleteDefaultOption> | AutocompletePropGetOptionLabel<OPTION>;
|
|
143
73
|
getOptionKey: AutocompletePropGetOptionKey<AutocompleteDefaultOption> | AutocompletePropGetOptionKey<OPTION>;
|
|
144
74
|
getOptionDisabled: AutocompletePropGetOptionDisabled<AutocompleteDefaultOption> | AutocompletePropGetOptionDisabled<OPTION>;
|
|
145
|
-
}
|
|
75
|
+
};
|
|
146
76
|
export declare const isMultipleParams: <OPTION>(params: AutocompleteProps<OPTION, boolean>) => params is AutocompleteProps<OPTION, true>;
|
|
147
77
|
export declare const isNotMultipleParams: <OPTION>(params: AutocompleteProps<OPTION, boolean>) => params is AutocompleteProps<OPTION, false>;
|
|
@@ -33,18 +33,6 @@ export type AutocompleteRenderMoreTagProps<OPTION> = {
|
|
|
33
33
|
omittedValues?: AutocompletePropValue<OPTION, true>;
|
|
34
34
|
};
|
|
35
35
|
export type AutocompletePropRenderMoreTag<OPTION> = (props: AutocompleteRenderMoreTagProps<OPTION>, ref?: Ref<TagRef>) => ReactNode;
|
|
36
|
-
type AutocompleteOpenControlledProps = {
|
|
37
|
-
/** Текущее состояние списка. Если `true`, список отображается. */
|
|
38
|
-
open?: boolean;
|
|
39
|
-
/** Состояние открытие по умолчанию (неконтролируемый компонент) */
|
|
40
|
-
defaultOpen?: never;
|
|
41
|
-
};
|
|
42
|
-
type AutocompleteOpenUncontrolledProps = {
|
|
43
|
-
/** Текущее состояние списка. Если `true`, список отображается. */
|
|
44
|
-
open?: never;
|
|
45
|
-
/** Состояние открытие по умолчанию (неконтролируемый компонент) */
|
|
46
|
-
defaultOpen?: boolean;
|
|
47
|
-
};
|
|
48
36
|
type AutocompleteInputProps = Pick<InputProps, 'hint' | 'style' | 'error' | 'label' | 'disabled' | 'required' | 'autoFocus' | 'fullWidth' | 'className' | 'hintProps' | 'bodyProps' | 'onKeyDown' | 'inputProps' | 'renderLeft' | 'renderRight' | 'placeholder' | 'disableStroke'>;
|
|
49
37
|
export type AutocompleteOnChange<OPTION, MULTIPLE extends boolean> = (e: SyntheticEvent | KeyboardEvent, value: (MULTIPLE extends true ? OPTION[] : OPTION) | null) => void;
|
|
50
38
|
export type AutocompleteOnInputChange = (e: ChangeEvent<HTMLInputElement> | null, value: string) => void;
|
|
@@ -67,6 +55,10 @@ export type AutocompleteProps<OPTION = AutocompleteDefaultOption, MULTIPLE exten
|
|
|
67
55
|
value?: AutocompletePropValue<OPTION, MULTIPLE>;
|
|
68
56
|
/** Выбранное значение опции по умолчанию */
|
|
69
57
|
defaultValue?: AutocompletePropValue<OPTION, MULTIPLE>;
|
|
58
|
+
/** Текущее состояние списка. Если `true`, список отображается. */
|
|
59
|
+
open?: boolean;
|
|
60
|
+
/** Состояние открытие по умолчанию (неконтролируемый компонент) */
|
|
61
|
+
defaultOpen?: boolean;
|
|
70
62
|
/** Функция обратного вызова, которая будет вызвана при выборе значения */
|
|
71
63
|
onChange?: AutocompleteOnChange<OPTION, MULTIPLE>;
|
|
72
64
|
/** Введённое значение в текстовом поле */
|
|
@@ -115,17 +107,19 @@ export type AutocompleteProps<OPTION = AutocompleteDefaultOption, MULTIPLE exten
|
|
|
115
107
|
popoverProps?: AutocompleteDropdownProps['popoverProps'];
|
|
116
108
|
/** Свойства компонента List */
|
|
117
109
|
listProps?: AutocompleteDropdownProps['listProps'];
|
|
118
|
-
|
|
110
|
+
/** Ссылка на HTML элемент */
|
|
111
|
+
ref?: Ref<HTMLDivElement>;
|
|
112
|
+
} & AutocompleteInputProps & (OPTION extends {
|
|
119
113
|
label: AutocompleteDefaultOption['label'];
|
|
120
|
-
} ?
|
|
114
|
+
} ? object : {
|
|
121
115
|
getOptionLabel?: AutocompletePropGetOptionLabel<OPTION>;
|
|
122
116
|
}) & (OPTION extends {
|
|
123
117
|
id: AutocompleteDefaultOption['id'];
|
|
124
|
-
} ?
|
|
118
|
+
} ? object : {
|
|
125
119
|
getOptionKey?: AutocompletePropGetOptionKey<OPTION>;
|
|
126
120
|
}) & (OPTION extends {
|
|
127
121
|
disabled: AutocompleteDefaultOption['disabled'];
|
|
128
|
-
} ?
|
|
122
|
+
} ? object : {
|
|
129
123
|
getOptionDisabled?: AutocompletePropGetOptionDisabled<OPTION>;
|
|
130
124
|
});
|
|
131
125
|
export type AutocompleteComponent = <OPTION = AutocompleteDefaultOption, MULTIPLE extends boolean = false>(props: AutocompleteProps<OPTION, MULTIPLE>) => ReactElement | null;
|