@hh.ru/magritte-ui-select 11.1.2 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SelectBottomSheet.js +1 -1
- package/SelectDrop.js +1 -1
- package/SelectEmptyHint.js +1 -1
- package/SelectError.js +1 -1
- package/SelectModal.js +1 -1
- package/SelectOption.js +1 -1
- package/index.css +57 -51
- package/index.d.ts +0 -1
- package/index.js +0 -1
- package/index.js.map +1 -1
- package/index.mock.d.ts +0 -2
- package/index.mock.js +1 -3
- package/index.mock.js.map +1 -1
- package/package.json +20 -20
package/SelectBottomSheet.js
CHANGED
|
@@ -24,7 +24,7 @@ import '@hh.ru/magritte-common-use-disabled';
|
|
|
24
24
|
import '@hh.ru/magritte-ui-checkable-card/CheckableCardElement';
|
|
25
25
|
import '@hh.ru/magritte-ui-checkbox-radio';
|
|
26
26
|
|
|
27
|
-
var styles = {"select-bottom-sheet":"magritte-select-bottom-
|
|
27
|
+
var styles = {"select-bottom-sheet":"magritte-select-bottom-sheet___1RZDJ_12-0-0","selectBottomSheet":"magritte-select-bottom-sheet___1RZDJ_12-0-0","select-bottom-sheet_checkbox":"magritte-select-bottom-sheet_checkbox___hwTgo_12-0-0","selectBottomSheetCheckbox":"magritte-select-bottom-sheet_checkbox___hwTgo_12-0-0","select-bottom-sheet_radio":"magritte-select-bottom-sheet_radio___qvFFV_12-0-0","selectBottomSheetRadio":"magritte-select-bottom-sheet_radio___qvFFV_12-0-0","select-bottom-sheet_without-header":"magritte-select-bottom-sheet_without-header___KOKVh_12-0-0","selectBottomSheetWithoutHeader":"magritte-select-bottom-sheet_without-header___KOKVh_12-0-0","full-screen-placeholder":"magritte-full-screen-placeholder___zPC8k_12-0-0","fullScreenPlaceholder":"magritte-full-screen-placeholder___zPC8k_12-0-0","error-wrapper":"magritte-error-wrapper___P7jYg_12-0-0","errorWrapper":"magritte-error-wrapper___P7jYg_12-0-0"};
|
|
28
28
|
|
|
29
29
|
const SelectOptionDefault = ({ data, input, type, checked, plain, }) => {
|
|
30
30
|
if (type === 'delimiter') {
|
package/SelectDrop.js
CHANGED
|
@@ -21,7 +21,7 @@ import '@hh.ru/magritte-common-use-disabled';
|
|
|
21
21
|
import '@hh.ru/magritte-ui-checkable-card/CheckableCardElement';
|
|
22
22
|
import '@hh.ru/magritte-ui-checkbox-radio';
|
|
23
23
|
|
|
24
|
-
var styles = {"select-drop-container-wrapper":"magritte-select-drop-container-
|
|
24
|
+
var styles = {"select-drop-container-wrapper":"magritte-select-drop-container-wrapper___OHM0q_12-0-0","selectDropContainerWrapper":"magritte-select-drop-container-wrapper___OHM0q_12-0-0","select-drop-container":"magritte-select-drop-container___hee1p_12-0-0","selectDropContainer":"magritte-select-drop-container___hee1p_12-0-0","select-drop-container_plain":"magritte-select-drop-container_plain___766zl_12-0-0","selectDropContainerPlain":"magritte-select-drop-container_plain___766zl_12-0-0","select-drop-container_with-footer":"magritte-select-drop-container_with-footer___6wp-L_12-0-0","selectDropContainerWithFooter":"magritte-select-drop-container_with-footer___6wp-L_12-0-0","select-drop":"magritte-select-drop___jn4O-_12-0-0","selectDrop":"magritte-select-drop___jn4O-_12-0-0","select-drop-header":"magritte-select-drop-header___fMmio_12-0-0","selectDropHeader":"magritte-select-drop-header___fMmio_12-0-0","select-drop_plain":"magritte-select-drop_plain___VL8Fz_12-0-0","selectDropPlain":"magritte-select-drop_plain___VL8Fz_12-0-0","label-option":"magritte-label-option___2N7t9_12-0-0","labelOption":"magritte-label-option___2N7t9_12-0-0","loading":"magritte-loading___AMiuq_12-0-0","hint":"magritte-hint___6qaFl_12-0-0"};
|
|
25
25
|
|
|
26
26
|
const SelectOptionDefault = ({ data, input, type, plain, checked, }) => {
|
|
27
27
|
if (type === 'delimiter') {
|
package/SelectEmptyHint.js
CHANGED
|
@@ -6,7 +6,7 @@ import { VSpacing } from '@hh.ru/magritte-ui-spacing';
|
|
|
6
6
|
import { Title } from '@hh.ru/magritte-ui-title';
|
|
7
7
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
8
8
|
|
|
9
|
-
var styles = {"select-empty-hint":"magritte-select-empty-
|
|
9
|
+
var styles = {"select-empty-hint":"magritte-select-empty-hint___B39XJ_12-0-0","selectEmptyHint":"magritte-select-empty-hint___B39XJ_12-0-0","icon":"magritte-icon___F0GQx_12-0-0","icon-init":"magritte-icon-init___GWK-V_12-0-0","iconInit":"magritte-icon-init___GWK-V_12-0-0","icon-search":"magritte-icon-search___ZsqO-_12-0-0","iconSearch":"magritte-icon-search___ZsqO-_12-0-0"};
|
|
10
10
|
|
|
11
11
|
const SelectEmptyHint = ({ title, titleElement, description, type }) => {
|
|
12
12
|
return (jsxs("div", { className: styles.selectEmptyHint, children: [type === 'init' && (jsx("div", { className: classnames(styles.icon, styles.iconInit), children: jsx(MagnifierOutlinedSize24, {}) })), type === 'emptySearch' && (jsx("div", { className: classnames(styles.icon, styles.iconSearch), children: jsx(EmojiHalfsadOutlinedSize24, {}) })), jsx(VSpacing, { default: 32 }), jsx(Title, { Element: titleElement, size: "small", children: title }), jsx(VSpacing, { default: 8 }), Boolean(description) && (jsx(Text, { typography: "paragraph-2-regular", style: "secondary", children: description }))] }));
|
package/SelectError.js
CHANGED
|
@@ -7,7 +7,7 @@ import { VSpacing } from '@hh.ru/magritte-ui-spacing';
|
|
|
7
7
|
import { Title } from '@hh.ru/magritte-ui-title';
|
|
8
8
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
9
9
|
|
|
10
|
-
var styles = {"error-container":"magritte-error-
|
|
10
|
+
var styles = {"error-container":"magritte-error-container___t9B5w_12-0-0","errorContainer":"magritte-error-container___t9B5w_12-0-0"};
|
|
11
11
|
|
|
12
12
|
const SelectError = ({ innerErrorTrls, reload, }) => {
|
|
13
13
|
const { isMobile } = useBreakpoint();
|
package/SelectModal.js
CHANGED
|
@@ -23,7 +23,7 @@ import '@hh.ru/magritte-common-use-disabled';
|
|
|
23
23
|
import '@hh.ru/magritte-ui-checkable-card/CheckableCardElement';
|
|
24
24
|
import '@hh.ru/magritte-ui-checkbox-radio';
|
|
25
25
|
|
|
26
|
-
var styles = {"select-modal-wrapper":"magritte-select-modal-
|
|
26
|
+
var styles = {"select-modal-wrapper":"magritte-select-modal-wrapper___5BhtC_12-0-0","selectModalWrapper":"magritte-select-modal-wrapper___5BhtC_12-0-0","select-modal":"magritte-select-modal___f9wc6_12-0-0","selectModal":"magritte-select-modal___f9wc6_12-0-0","select-modal_plain":"magritte-select-modal_plain___0rP39_12-0-0","selectModalPlain":"magritte-select-modal_plain___0rP39_12-0-0","label-option":"magritte-label-option___kFAuR_12-0-0","labelOption":"magritte-label-option___kFAuR_12-0-0","layer-full-height":"magritte-layer-full-height___cJX-K_12-0-0","layerFullHeight":"magritte-layer-full-height___cJX-K_12-0-0"};
|
|
27
27
|
|
|
28
28
|
const SelectOptionDefault = ({ data, input, type, plain, checked, }) => {
|
|
29
29
|
if (type === 'delimiter') {
|
package/SelectOption.js
CHANGED
|
@@ -8,7 +8,7 @@ import { CheckableCardElement } from '@hh.ru/magritte-ui-checkable-card/Checkabl
|
|
|
8
8
|
import { Radio, Checkbox } from '@hh.ru/magritte-ui-checkbox-radio';
|
|
9
9
|
import { Text } from '@hh.ru/magritte-ui-typography';
|
|
10
10
|
|
|
11
|
-
var styles = {"select-option-plain":"magritte-select-option-
|
|
11
|
+
var styles = {"select-option-plain":"magritte-select-option-plain___dfz4a_12-0-0","selectOptionPlain":"magritte-select-option-plain___dfz4a_12-0-0","select-option-plain_active":"magritte-select-option-plain_active___AQSQS_12-0-0","selectOptionPlainActive":"magritte-select-option-plain_active___AQSQS_12-0-0","select-delimiter":"magritte-select-delimiter___WyeR6_12-0-0","selectDelimiter":"magritte-select-delimiter___WyeR6_12-0-0"};
|
|
12
12
|
|
|
13
13
|
const CheckableComponent = ({ type, value, checked, name, onChange, 'data-qa': dataQa, }) => {
|
|
14
14
|
if (type === 'label') {
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.magritte-error-
|
|
1
|
+
.magritte-error-container___t9B5w_12-0-0{
|
|
2
2
|
display:flex;
|
|
3
3
|
flex-direction:column;
|
|
4
4
|
align-items:center;
|
|
@@ -6,102 +6,102 @@
|
|
|
6
6
|
justify-content:center;
|
|
7
7
|
}
|
|
8
8
|
@media (min-width: 1020px){
|
|
9
|
-
body.magritte-old-layout .magritte-error-
|
|
9
|
+
body.magritte-old-layout .magritte-error-container___t9B5w_12-0-0{
|
|
10
10
|
min-height:320px;
|
|
11
11
|
height:auto;
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
@media (min-width: 1024px){
|
|
15
|
-
body:not(.magritte-old-layout) .magritte-error-
|
|
15
|
+
body:not(.magritte-old-layout) .magritte-error-container___t9B5w_12-0-0{
|
|
16
16
|
min-height:320px;
|
|
17
17
|
height:auto;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.magritte-select-option-
|
|
21
|
+
.magritte-select-option-plain___dfz4a_12-0-0:hover{
|
|
22
22
|
cursor:default;
|
|
23
23
|
}
|
|
24
|
-
.magritte-select-option-
|
|
24
|
+
.magritte-select-option-plain_active___AQSQS_12-0-0:hover{
|
|
25
25
|
cursor:pointer;
|
|
26
26
|
}
|
|
27
|
-
.magritte-select-
|
|
27
|
+
.magritte-select-delimiter___WyeR6_12-0-0{
|
|
28
28
|
padding-left:16px;
|
|
29
29
|
padding-top:12px;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
:root{
|
|
33
|
-
--magritte-static-space-400-v22-
|
|
33
|
+
--magritte-static-space-400-v22-1-0:16px;
|
|
34
34
|
}
|
|
35
|
-
.magritte-select-bottom-
|
|
35
|
+
.magritte-select-bottom-sheet___1RZDJ_12-0-0{
|
|
36
36
|
display:flex;
|
|
37
37
|
flex-direction:column;
|
|
38
|
-
padding:0 var(--magritte-static-space-400-v22-
|
|
38
|
+
padding:0 var(--magritte-static-space-400-v22-1-0);
|
|
39
39
|
padding-bottom:16px;
|
|
40
40
|
}
|
|
41
|
-
.magritte-select-bottom-
|
|
42
|
-
.magritte-select-bottom-
|
|
41
|
+
.magritte-select-bottom-sheet_checkbox___hwTgo_12-0-0,
|
|
42
|
+
.magritte-select-bottom-sheet_radio___qvFFV_12-0-0{
|
|
43
43
|
gap:12px;
|
|
44
44
|
}
|
|
45
|
-
.magritte-select-bottom-sheet_without-
|
|
45
|
+
.magritte-select-bottom-sheet_without-header___KOKVh_12-0-0{
|
|
46
46
|
padding-top:16px;
|
|
47
47
|
}
|
|
48
|
-
.magritte-full-screen-
|
|
48
|
+
.magritte-full-screen-placeholder___zPC8k_12-0-0{
|
|
49
49
|
display:flex;
|
|
50
50
|
flex-direction:column;
|
|
51
51
|
align-items:center;
|
|
52
52
|
height:100%;
|
|
53
53
|
justify-content:center;
|
|
54
54
|
}
|
|
55
|
-
.magritte-error-
|
|
55
|
+
.magritte-error-wrapper___P7jYg_12-0-0{
|
|
56
56
|
height:100%;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
:root{
|
|
60
|
-
--magritte-static-space-300-v22-
|
|
61
|
-
--magritte-static-space-600-v22-
|
|
60
|
+
--magritte-static-space-300-v22-1-0:12px;
|
|
61
|
+
--magritte-static-space-600-v22-1-0:24px;
|
|
62
62
|
}
|
|
63
|
-
.magritte-select-drop-container-
|
|
63
|
+
.magritte-select-drop-container-wrapper___OHM0q_12-0-0{
|
|
64
64
|
display:flex;
|
|
65
65
|
flex-direction:column;
|
|
66
66
|
}
|
|
67
|
-
.magritte-select-drop-
|
|
67
|
+
.magritte-select-drop-container___hee1p_12-0-0{
|
|
68
68
|
display:flex;
|
|
69
69
|
flex-direction:column;
|
|
70
|
-
padding:var(--magritte-static-space-300-v22-
|
|
71
|
-
margin:calc(-1 * var(--magritte-static-space-300-v22-
|
|
70
|
+
padding:var(--magritte-static-space-300-v22-1-0);
|
|
71
|
+
margin:calc(-1 * var(--magritte-static-space-300-v22-1-0));
|
|
72
72
|
}
|
|
73
|
-
.magritte-select-drop-
|
|
74
|
-
padding:var(--magritte-static-space-600-v22-
|
|
75
|
-
margin:calc(-1 * var(--magritte-static-space-600-v22-
|
|
73
|
+
.magritte-select-drop-container_plain___766zl_12-0-0{
|
|
74
|
+
padding:var(--magritte-static-space-600-v22-1-0);
|
|
75
|
+
margin:calc(-1 * var(--magritte-static-space-600-v22-1-0));
|
|
76
76
|
}
|
|
77
|
-
.magritte-select-drop-container_with-footer___6wp-
|
|
77
|
+
.magritte-select-drop-container_with-footer___6wp-L_12-0-0{
|
|
78
78
|
margin-bottom:0;
|
|
79
79
|
padding-bottom:0;
|
|
80
80
|
}
|
|
81
|
-
.magritte-select-drop___jn4O-
|
|
81
|
+
.magritte-select-drop___jn4O-_12-0-0{
|
|
82
82
|
display:flex;
|
|
83
83
|
flex-direction:column;
|
|
84
84
|
gap:8px;
|
|
85
85
|
}
|
|
86
|
-
.magritte-select-drop-
|
|
86
|
+
.magritte-select-drop-header___fMmio_12-0-0{
|
|
87
87
|
display:flex;
|
|
88
88
|
flex-direction:column;
|
|
89
89
|
margin-bottom:8px;
|
|
90
90
|
}
|
|
91
|
-
.magritte-select-
|
|
91
|
+
.magritte-select-drop_plain___VL8Fz_12-0-0{
|
|
92
92
|
gap:16px;
|
|
93
93
|
}
|
|
94
|
-
.magritte-label-
|
|
94
|
+
.magritte-label-option___2N7t9_12-0-0{
|
|
95
95
|
display:flex;
|
|
96
96
|
justify-content:center;
|
|
97
97
|
}
|
|
98
|
-
.magritte-
|
|
98
|
+
.magritte-loading___AMiuq_12-0-0{
|
|
99
99
|
display:flex;
|
|
100
100
|
align-items:center;
|
|
101
101
|
height:150px;
|
|
102
102
|
justify-content:center;
|
|
103
103
|
}
|
|
104
|
-
.magritte-
|
|
104
|
+
.magritte-hint___6qaFl_12-0-0{
|
|
105
105
|
display:flex;
|
|
106
106
|
flex-direction:column;
|
|
107
107
|
align-items:center;
|
|
@@ -109,24 +109,24 @@
|
|
|
109
109
|
justify-content:center;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
.magritte-select-modal-
|
|
112
|
+
.magritte-select-modal-wrapper___5BhtC_12-0-0{
|
|
113
113
|
display:flex;
|
|
114
114
|
flex-direction:column;
|
|
115
115
|
flex-grow:1;
|
|
116
116
|
}
|
|
117
|
-
.magritte-select-
|
|
117
|
+
.magritte-select-modal___f9wc6_12-0-0{
|
|
118
118
|
display:flex;
|
|
119
119
|
flex-direction:column;
|
|
120
120
|
gap:12px;
|
|
121
121
|
}
|
|
122
|
-
.magritte-select-
|
|
122
|
+
.magritte-select-modal_plain___0rP39_12-0-0{
|
|
123
123
|
gap:0;
|
|
124
124
|
}
|
|
125
|
-
.magritte-label-
|
|
125
|
+
.magritte-label-option___kFAuR_12-0-0{
|
|
126
126
|
display:flex;
|
|
127
127
|
justify-content:center;
|
|
128
128
|
}
|
|
129
|
-
.magritte-layer-full-height___cJX-
|
|
129
|
+
.magritte-layer-full-height___cJX-K_12-0-0{
|
|
130
130
|
display:flex;
|
|
131
131
|
flex-direction:column;
|
|
132
132
|
align-items:center;
|
|
@@ -136,25 +136,31 @@
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
:root{
|
|
139
|
-
--magritte-color-background-secondary-v22-
|
|
140
|
-
--magritte-color-background-accent-secondary-v22-
|
|
141
|
-
--magritte-color-icon-tertiary-v22-
|
|
142
|
-
--magritte-color-icon-accent-v22-
|
|
139
|
+
--magritte-color-background-secondary-v22-1-0:#F1F4F9;
|
|
140
|
+
--magritte-color-background-accent-secondary-v22-1-0:#EDF6FF;
|
|
141
|
+
--magritte-color-icon-tertiary-v22-1-0:#AABBCA;
|
|
142
|
+
--magritte-color-icon-accent-v22-1-0:#0070ff;
|
|
143
143
|
}
|
|
144
144
|
.magritte-night-theme{
|
|
145
|
-
--magritte-color-background-secondary-v22-
|
|
146
|
-
--magritte-color-background-accent-secondary-v22-
|
|
147
|
-
--magritte-color-icon-tertiary-v22-
|
|
148
|
-
--magritte-color-icon-accent-v22-
|
|
145
|
+
--magritte-color-background-secondary-v22-1-0:#303030;
|
|
146
|
+
--magritte-color-background-accent-secondary-v22-1-0:#222D3D;
|
|
147
|
+
--magritte-color-icon-tertiary-v22-1-0:#767676;
|
|
148
|
+
--magritte-color-icon-accent-v22-1-0:#5e9eff;
|
|
149
149
|
}
|
|
150
|
-
.magritte-
|
|
150
|
+
.magritte-zp-day-theme{
|
|
151
|
+
--magritte-color-background-secondary-v22-1-0:#F1F4F9;
|
|
152
|
+
--magritte-color-background-accent-secondary-v22-1-0:#F1F4F7;
|
|
153
|
+
--magritte-color-icon-tertiary-v22-1-0:#DCE3EB;
|
|
154
|
+
--magritte-color-icon-accent-v22-1-0:#7195AF;
|
|
155
|
+
}
|
|
156
|
+
.magritte-select-empty-hint___B39XJ_12-0-0{
|
|
151
157
|
display:flex;
|
|
152
158
|
flex-direction:column;
|
|
153
159
|
justify-content:center;
|
|
154
160
|
align-content:center;
|
|
155
161
|
align-items:center;
|
|
156
162
|
}
|
|
157
|
-
.magritte-
|
|
163
|
+
.magritte-icon___F0GQx_12-0-0{
|
|
158
164
|
display:flex;
|
|
159
165
|
align-items:center;
|
|
160
166
|
justify-content:center;
|
|
@@ -162,11 +168,11 @@
|
|
|
162
168
|
height:48px;
|
|
163
169
|
border-radius:50%;
|
|
164
170
|
}
|
|
165
|
-
.magritte-icon-init___GWK-
|
|
166
|
-
background-color:var(--magritte-color-background-accent-secondary-v22-
|
|
167
|
-
--magritte-ui-icon-color-override:var(--magritte-color-icon-accent-v22-
|
|
171
|
+
.magritte-icon-init___GWK-V_12-0-0{
|
|
172
|
+
background-color:var(--magritte-color-background-accent-secondary-v22-1-0);
|
|
173
|
+
--magritte-ui-icon-color-override:var(--magritte-color-icon-accent-v22-1-0);
|
|
168
174
|
}
|
|
169
|
-
.magritte-icon-search___ZsqO-
|
|
170
|
-
background-color:var(--magritte-color-background-secondary-v22-
|
|
171
|
-
--magritte-ui-icon-color-override:var(--magritte-color-icon-tertiary-v22-
|
|
175
|
+
.magritte-icon-search___ZsqO-_12-0-0{
|
|
176
|
+
background-color:var(--magritte-color-background-secondary-v22-1-0);
|
|
177
|
+
--magritte-ui-icon-color-override:var(--magritte-color-icon-tertiary-v22-1-0);
|
|
172
178
|
}
|
package/index.d.ts
CHANGED
package/index.js
CHANGED
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/index.mock.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export type * from '@hh.ru/magritte-ui-select/types';
|
|
3
|
-
declare const ThemeProvider: any;
|
|
4
|
-
export { ThemeProvider };
|
|
5
3
|
export declare const Select: FC<Record<string, unknown>>;
|
|
6
4
|
export declare const UncontrolledSelect: FC<Record<string, unknown>>;
|
package/index.mock.js
CHANGED
|
@@ -31,8 +31,6 @@ const mockComponent = (componentName, staticProps = {}, { withChildren, innerDep
|
|
|
31
31
|
return mockWrapper;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
35
|
-
const { ThemeProvider } = jest.requireActual('@hh.ru/magritte-ui-theme-provider/index');
|
|
36
34
|
const Select = mockComponent('Select', undefined, {
|
|
37
35
|
withChildren: true,
|
|
38
36
|
});
|
|
@@ -40,5 +38,5 @@ const UncontrolledSelect = mockComponent('UncontrolledSelect', undefined, {
|
|
|
40
38
|
withChildren: true,
|
|
41
39
|
});
|
|
42
40
|
|
|
43
|
-
export { Select,
|
|
41
|
+
export { Select, UncontrolledSelect };
|
|
44
42
|
//# sourceMappingURL=index.mock.js.map
|
package/index.mock.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mock.js","sources":["../../mock-component/lib/setupMockComponent.js","../src/index.mock.ts"],"sourcesContent":["import { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\n\nfunction enhance(mockComponent, staticProps) {\n // удаляем внутренний свойства реакта, чтобы не перезаписать ими mockComponent\n delete staticProps.type;\n delete staticProps.$$typeof;\n delete staticProps.render;\n for (const prop in staticProps) {\n mockComponent[prop] = staticProps[prop];\n }\n}\nconst MockComponent = ({ style, ...props }) => (\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line react/jsx-no-undef\njsx(\"magritte-component-mock\", { \"style-data\": style, ...props }));\nconst MockComponentRenderProp = ({ style, ...props }) => (\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line react/jsx-no-undef\njsx(\"magritte-component-mock-render-prop\", { \"style-data\": style, ...props }));\n/**\n * Возвращает mock React компонента\n */\nconst mockComponent = (componentName, staticProps = {}, { withChildren, innerDependence, WrapperComponent } = {}) => {\n const mockWrapper = forwardRef(({ children, ...props }, ref) => {\n const mock = (\n // eslint-disable-next-line react/jsx-no-undef\n jsxs(MockComponent, { ...props, _component: componentName, children: [innerDependence ? innerDependence(props, ref) : null, withChildren ? children : null] }));\n return WrapperComponent ? jsx(WrapperComponent, { ...props, children: mock }) : mock;\n });\n staticProps && enhance(mockWrapper, staticProps);\n mockWrapper.displayName = 'magritte-ref';\n return mockWrapper;\n};\n/**\n * Возвращает mock React компонента, который рендерит переданный в него пропс render\n *\n * @param {String} componentName наименование компонента\n * @param {Object} [staticProps] объект со свойствами, которыми необходимо усилить mock\n * @param {Object} [options] параметры мока\n * @param {boolean} [options.withChildren] флаг отвечает за рендеринг children компонента\n * @param {React.Component} [options.innerDependence] Реакт компонент, который рендерится внутри мока.\n * Необходим, когда mock компоненту требуется иметь\n * дополнительные элементы\n */\nconst mockComponentRenderProp = (componentName, staticProps, { withChildren, innerDependence, renderArguments } = { renderArguments: [] }) => {\n const mockWrapper = ({ render, children, ...props }) => (jsxs(MockComponentRenderProp, { ...props, _component: componentName, children: [innerDependence ? innerDependence(props) : null, withChildren ? children : null, render?.(...(renderArguments || []))] }));\n staticProps && enhance(mockWrapper, staticProps);\n mockWrapper.displayName = 'magritte-component-mock-render-prop';\n return mockWrapper;\n};\n\nexport { mockComponent, mockComponentRenderProp };\n//# sourceMappingURL=setupMockComponent.js.map\n","import { FC } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport type * from '@hh.ru/magritte-ui-select/types';\n\
|
|
1
|
+
{"version":3,"file":"index.mock.js","sources":["../../mock-component/lib/setupMockComponent.js","../src/index.mock.ts"],"sourcesContent":["import { jsxs, jsx } from 'react/jsx-runtime';\nimport { forwardRef } from 'react';\n\nfunction enhance(mockComponent, staticProps) {\n // удаляем внутренний свойства реакта, чтобы не перезаписать ими mockComponent\n delete staticProps.type;\n delete staticProps.$$typeof;\n delete staticProps.render;\n for (const prop in staticProps) {\n mockComponent[prop] = staticProps[prop];\n }\n}\nconst MockComponent = ({ style, ...props }) => (\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line react/jsx-no-undef\njsx(\"magritte-component-mock\", { \"style-data\": style, ...props }));\nconst MockComponentRenderProp = ({ style, ...props }) => (\n// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-ignore\n// eslint-disable-next-line react/jsx-no-undef\njsx(\"magritte-component-mock-render-prop\", { \"style-data\": style, ...props }));\n/**\n * Возвращает mock React компонента\n */\nconst mockComponent = (componentName, staticProps = {}, { withChildren, innerDependence, WrapperComponent } = {}) => {\n const mockWrapper = forwardRef(({ children, ...props }, ref) => {\n const mock = (\n // eslint-disable-next-line react/jsx-no-undef\n jsxs(MockComponent, { ...props, _component: componentName, children: [innerDependence ? innerDependence(props, ref) : null, withChildren ? children : null] }));\n return WrapperComponent ? jsx(WrapperComponent, { ...props, children: mock }) : mock;\n });\n staticProps && enhance(mockWrapper, staticProps);\n mockWrapper.displayName = 'magritte-ref';\n return mockWrapper;\n};\n/**\n * Возвращает mock React компонента, который рендерит переданный в него пропс render\n *\n * @param {String} componentName наименование компонента\n * @param {Object} [staticProps] объект со свойствами, которыми необходимо усилить mock\n * @param {Object} [options] параметры мока\n * @param {boolean} [options.withChildren] флаг отвечает за рендеринг children компонента\n * @param {React.Component} [options.innerDependence] Реакт компонент, который рендерится внутри мока.\n * Необходим, когда mock компоненту требуется иметь\n * дополнительные элементы\n */\nconst mockComponentRenderProp = (componentName, staticProps, { withChildren, innerDependence, renderArguments } = { renderArguments: [] }) => {\n const mockWrapper = ({ render, children, ...props }) => (jsxs(MockComponentRenderProp, { ...props, _component: componentName, children: [innerDependence ? innerDependence(props) : null, withChildren ? children : null, render?.(...(renderArguments || []))] }));\n staticProps && enhance(mockWrapper, staticProps);\n mockWrapper.displayName = 'magritte-component-mock-render-prop';\n return mockWrapper;\n};\n\nexport { mockComponent, mockComponentRenderProp };\n//# sourceMappingURL=setupMockComponent.js.map\n","import { FC } from 'react';\n\nimport { mockComponent } from '@hh.ru/magritte-ui-mock-component';\n\nexport type * from '@hh.ru/magritte-ui-select/types';\n\nexport const Select: FC<Record<string, unknown>> = mockComponent('Select', undefined, {\n withChildren: true,\n});\n\nexport const UncontrolledSelect: FC<Record<string, unknown>> = mockComponent('UncontrolledSelect', undefined, {\n withChildren: true,\n});\n"],"names":[],"mappings":";;;AAGA,SAAS,OAAO,CAAC,aAAa,EAAE,WAAW,EAAE;AAC7C;AACA,IAAI,OAAO,WAAW,CAAC,IAAI,CAAC;AAC5B,IAAI,OAAO,WAAW,CAAC,QAAQ,CAAC;AAChC,IAAI,OAAO,WAAW,CAAC,MAAM,CAAC;AAC9B,IAAI,KAAK,MAAM,IAAI,IAAI,WAAW,EAAE;AACpC,QAAQ,aAAa,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;AAChD,KAAK;AACL,CAAC;AACD,MAAM,aAAa,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE;AAC1C;AACA;AACA;AACA,GAAG,CAAC,yBAAyB,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,CAAC,CAAC,CAAC;AAMnE;AACA;AACA;AACA,MAAM,aAAa,GAAG,CAAC,aAAa,EAAE,WAAW,GAAG,EAAE,EAAE,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,GAAG,EAAE,KAAK;AACrH,IAAI,MAAM,WAAW,GAAG,UAAU,CAAC,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,KAAK;AACpE,QAAQ,MAAM,IAAI;AAClB;AACA,QAAQ,IAAI,CAAC,aAAa,EAAE,EAAE,GAAG,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,CAAC,eAAe,GAAG,eAAe,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,IAAI,EAAE,YAAY,GAAG,QAAQ,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AACxK,QAAQ,OAAO,gBAAgB,GAAG,GAAG,CAAC,gBAAgB,EAAE,EAAE,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAAC;AAC7F,KAAK,CAAC,CAAC;AACP,IAAI,WAAW,IAAI,OAAO,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;AACrD,IAAI,WAAW,CAAC,WAAW,GAAG,cAAc,CAAC;AAC7C,IAAI,OAAO,WAAW,CAAC;AACvB,CAAC;;MC7BY,MAAM,GAAgC,aAAa,CAAC,QAAQ,EAAE,SAAS,EAAE;AAClF,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA,EAAE;MAEU,kBAAkB,GAAgC,aAAa,CAAC,oBAAoB,EAAE,SAAS,EAAE;AAC1G,IAAA,YAAY,EAAE,IAAI;AACrB,CAAA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hh.ru/magritte-ui-select",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "12.0.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"sideEffects": [
|
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
"@hh.ru/magritte-common-keyboard": "4.1.2",
|
|
32
32
|
"@hh.ru/magritte-common-use-disabled": "1.0.12",
|
|
33
33
|
"@hh.ru/magritte-common-use-multiple-refs": "1.1.7",
|
|
34
|
-
"@hh.ru/magritte-
|
|
35
|
-
"@hh.ru/magritte-ui-
|
|
34
|
+
"@hh.ru/magritte-design-tokens": "22.1.0",
|
|
35
|
+
"@hh.ru/magritte-ui-action-bar": "4.0.7",
|
|
36
|
+
"@hh.ru/magritte-ui-bottom-sheet": "8.0.0",
|
|
36
37
|
"@hh.ru/magritte-ui-breakpoint": "5.0.3",
|
|
37
|
-
"@hh.ru/magritte-ui-button": "
|
|
38
|
-
"@hh.ru/magritte-ui-button-stack": "2.1.
|
|
39
|
-
"@hh.ru/magritte-ui-cell": "
|
|
40
|
-
"@hh.ru/magritte-ui-checkable-card": "
|
|
41
|
-
"@hh.ru/magritte-ui-checkbox-radio": "
|
|
42
|
-
"@hh.ru/magritte-ui-drop": "
|
|
43
|
-
"@hh.ru/magritte-ui-icon": "
|
|
44
|
-
"@hh.ru/magritte-ui-input": "
|
|
45
|
-
"@hh.ru/magritte-ui-loader": "
|
|
46
|
-
"@hh.ru/magritte-ui-modal": "
|
|
47
|
-
"@hh.ru/magritte-ui-navigation-bar": "
|
|
48
|
-
"@hh.ru/magritte-ui-spacing": "2.0.
|
|
49
|
-
"@hh.ru/magritte-ui-
|
|
50
|
-
"@hh.ru/magritte-ui-
|
|
51
|
-
"@hh.ru/magritte-ui-
|
|
52
|
-
"@hh.ru/magritte-ui-typography": "3.0.47"
|
|
38
|
+
"@hh.ru/magritte-ui-button": "6.0.0",
|
|
39
|
+
"@hh.ru/magritte-ui-button-stack": "2.1.70",
|
|
40
|
+
"@hh.ru/magritte-ui-cell": "6.0.0",
|
|
41
|
+
"@hh.ru/magritte-ui-checkable-card": "4.0.0",
|
|
42
|
+
"@hh.ru/magritte-ui-checkbox-radio": "4.0.0",
|
|
43
|
+
"@hh.ru/magritte-ui-drop": "11.0.0",
|
|
44
|
+
"@hh.ru/magritte-ui-icon": "12.0.0",
|
|
45
|
+
"@hh.ru/magritte-ui-input": "9.0.0",
|
|
46
|
+
"@hh.ru/magritte-ui-loader": "2.0.0",
|
|
47
|
+
"@hh.ru/magritte-ui-modal": "9.0.0",
|
|
48
|
+
"@hh.ru/magritte-ui-navigation-bar": "10.0.0",
|
|
49
|
+
"@hh.ru/magritte-ui-spacing": "2.0.57",
|
|
50
|
+
"@hh.ru/magritte-ui-title": "7.0.0",
|
|
51
|
+
"@hh.ru/magritte-ui-trigger": "4.0.0",
|
|
52
|
+
"@hh.ru/magritte-ui-typography": "4.0.0"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "a823b2d582e812bf99b5fdf32058a93eaa59076b"
|
|
55
55
|
}
|