linear-react-components-ui 1.0.12-beta.8 → 1.0.12-beta.9
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/lib/@types/PointerEvents.d.ts +1 -1
- package/lib/assets/styles/icon.scss +8 -0
- package/lib/assets/styles/multiSelect.scss +28 -13
- package/lib/assets/styles/select.scss +34 -12
- package/lib/assets/styles/sidenav.scss +93 -42
- package/lib/buttons/button_container/index.js +1 -0
- package/lib/dialog/Custom.js +1 -1
- package/lib/dialog/form/index.js +8 -4
- package/lib/dialog/types.d.ts +2 -2
- package/lib/form/FieldNumber.js +1 -0
- package/lib/icons/index.d.ts +6 -2
- package/lib/icons/index.js +44 -23
- package/lib/icons/types.d.ts +6 -0
- package/lib/inputs/base/InputTextBase.js +0 -4
- package/lib/inputs/base/types.d.ts +1 -2
- package/lib/inputs/select/multiple/index.js +17 -24
- package/lib/inputs/select/simple/index.js +0 -4
- package/lib/inputs/types.d.ts +1 -2
- package/lib/menus/sidenav/NavMenuItem.js +1 -0
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
type PointerEvents = 'none' | 'all' | 'fill' | 'painted' | 'stroke' | 'visible' | 'visibleFill' | 'visiblePainted' | 'visibleStroke' | 'inherit' | 'initial' | 'unset';
|
|
1
|
+
type PointerEvents = 'none' | 'all' | 'fill' | 'painted' | 'stroke' | 'visible' | 'visibleFill' | 'visiblePainted' | 'visibleStroke' | 'inherit' | 'initial' | 'unset' | 'auto';
|
|
2
2
|
|
|
3
3
|
export { PointerEvents };
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
@import "commons.scss";
|
|
2
2
|
@import "effects.scss";
|
|
3
|
+
|
|
3
4
|
.multiSelect-component {
|
|
4
5
|
width: 100%;
|
|
5
6
|
display: block;
|
|
7
|
+
|
|
6
8
|
.selectwrapper {
|
|
7
9
|
height: auto;
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
>.multiselect {
|
|
10
12
|
flex-wrap: wrap;
|
|
11
13
|
position: relative;
|
|
12
|
-
|
|
14
|
+
|
|
15
|
+
>.textinput {
|
|
13
16
|
order: 1;
|
|
14
17
|
display: inline-block;
|
|
15
18
|
}
|
|
16
|
-
|
|
19
|
+
|
|
20
|
+
>.selecteditem {
|
|
17
21
|
font-size: 14px;
|
|
18
22
|
position: absolute;
|
|
19
23
|
top: 50%;
|
|
@@ -22,21 +26,21 @@
|
|
|
22
26
|
}
|
|
23
27
|
}
|
|
24
28
|
|
|
25
|
-
|
|
29
|
+
>.actionbutton {
|
|
26
30
|
display: flex;
|
|
27
31
|
align-items: center;
|
|
28
32
|
cursor: pointer;
|
|
29
33
|
margin: 0 3px;
|
|
30
34
|
padding: 0 3px;
|
|
31
35
|
|
|
32
|
-
>
|
|
36
|
+
>svg {
|
|
33
37
|
margin: 0;
|
|
34
38
|
}
|
|
35
39
|
}
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
42
|
|
|
39
|
-
.multiSelect-component
|
|
43
|
+
.multiSelect-component>.dropdown {
|
|
40
44
|
animation: 0.5s ease-in 0s 1 slideDown;
|
|
41
45
|
background-color: #fff;
|
|
42
46
|
border: $component-border-color;
|
|
@@ -48,40 +52,48 @@
|
|
|
48
52
|
overflow-x: hidden;
|
|
49
53
|
position: absolute;
|
|
50
54
|
z-index: 9999;
|
|
51
|
-
|
|
55
|
+
|
|
56
|
+
>.filtercontainer {
|
|
52
57
|
position: relative;
|
|
53
58
|
display: grid;
|
|
54
59
|
grid-template-columns: 1fr 20px;
|
|
55
60
|
border: 1px solid $component-border-color;
|
|
56
61
|
margin: 4px;
|
|
57
|
-
|
|
62
|
+
|
|
63
|
+
>.filterinput {
|
|
58
64
|
border: 0;
|
|
59
65
|
font-size: 13px;
|
|
60
66
|
text-indent: 4px;
|
|
61
67
|
padding: 10px 5px;
|
|
62
68
|
}
|
|
63
|
-
|
|
69
|
+
|
|
70
|
+
>.filtericon {
|
|
64
71
|
position: absolute;
|
|
65
72
|
right: 5px;
|
|
66
73
|
top: 10px;
|
|
67
74
|
}
|
|
68
75
|
}
|
|
69
|
-
|
|
76
|
+
|
|
77
|
+
>.listcontainer>.item {
|
|
70
78
|
margin: 0;
|
|
71
79
|
padding: 6px 10px;
|
|
72
80
|
display: flex;
|
|
73
81
|
cursor: pointer;
|
|
74
82
|
justify-content: stretch;
|
|
75
83
|
border-bottom: solid 1px #e1e1e1;
|
|
84
|
+
|
|
76
85
|
&:last-child {
|
|
77
86
|
border-bottom: none;
|
|
78
87
|
}
|
|
88
|
+
|
|
79
89
|
&:hover {
|
|
80
90
|
background-color: $default-hover-color;
|
|
81
91
|
}
|
|
92
|
+
|
|
82
93
|
&.-selected {
|
|
83
94
|
background-color: $default-hover-color;
|
|
84
95
|
}
|
|
96
|
+
|
|
85
97
|
.menubutton {
|
|
86
98
|
background-color: transparent;
|
|
87
99
|
border: 0;
|
|
@@ -91,13 +103,16 @@
|
|
|
91
103
|
justify-content: space-between;
|
|
92
104
|
align-items: center;
|
|
93
105
|
width: 100%;
|
|
94
|
-
|
|
106
|
+
|
|
107
|
+
>.checkboxicon {
|
|
95
108
|
margin-right: 5px;
|
|
96
109
|
}
|
|
97
|
-
|
|
110
|
+
|
|
111
|
+
>.label {
|
|
98
112
|
flex-grow: 1;
|
|
99
113
|
}
|
|
100
|
-
|
|
114
|
+
|
|
115
|
+
>.menuicon {
|
|
101
116
|
margin-right: 5px;
|
|
102
117
|
}
|
|
103
118
|
}
|
|
@@ -1,28 +1,35 @@
|
|
|
1
1
|
@import "commons.scss";
|
|
2
2
|
@import "effects.scss";
|
|
3
|
+
|
|
3
4
|
.select-component {
|
|
4
5
|
width: 100%;
|
|
5
6
|
display: block;
|
|
6
7
|
position: relative;
|
|
8
|
+
|
|
7
9
|
.selectwrapper {
|
|
8
10
|
height: auto;
|
|
9
11
|
}
|
|
12
|
+
|
|
10
13
|
.selectwrapper .actionbutton {
|
|
11
14
|
cursor: pointer;
|
|
12
15
|
display: flex;
|
|
13
16
|
align-items: center;
|
|
14
17
|
height: 100%;
|
|
15
|
-
|
|
18
|
+
|
|
19
|
+
>.iconclear {
|
|
16
20
|
margin: 8px -3px 2px 3px;
|
|
17
21
|
}
|
|
18
22
|
}
|
|
19
|
-
|
|
23
|
+
|
|
24
|
+
.selectwrapper>.multiselect {
|
|
20
25
|
flex-wrap: wrap;
|
|
21
|
-
|
|
26
|
+
|
|
27
|
+
>.textinput {
|
|
22
28
|
order: 1;
|
|
23
29
|
display: inline-block;
|
|
24
30
|
}
|
|
25
|
-
|
|
31
|
+
|
|
32
|
+
>.selecteditem {
|
|
26
33
|
background-color: #f2f9fc;
|
|
27
34
|
border: 1px solid #c9e6f2;
|
|
28
35
|
border-radius: 3px;
|
|
@@ -37,8 +44,10 @@
|
|
|
37
44
|
padding: 0px 8px 0px 5px;
|
|
38
45
|
}
|
|
39
46
|
}
|
|
40
|
-
|
|
47
|
+
|
|
48
|
+
.selectwrapper>.multiselect>.selecteditem>.close {
|
|
41
49
|
cursor: pointer;
|
|
50
|
+
|
|
42
51
|
&:after {
|
|
43
52
|
content: "×";
|
|
44
53
|
font-size: 16px;
|
|
@@ -48,7 +57,7 @@
|
|
|
48
57
|
}
|
|
49
58
|
}
|
|
50
59
|
|
|
51
|
-
.dropdown-component
|
|
60
|
+
.dropdown-component>.select-dropdown {
|
|
52
61
|
animation: 0.5s ease-in 0s 1 slideDown;
|
|
53
62
|
background-color: #FFF;
|
|
54
63
|
border: $component-border-color;
|
|
@@ -59,45 +68,55 @@
|
|
|
59
68
|
overflow-y: auto;
|
|
60
69
|
overflow-x: hidden;
|
|
61
70
|
margin-top: 2px;
|
|
62
|
-
|
|
71
|
+
|
|
72
|
+
>.filtercontainer {
|
|
63
73
|
display: grid;
|
|
64
74
|
grid-template-columns: 1fr 20px;
|
|
65
75
|
align-items: center;
|
|
66
76
|
border: 1px solid $component-border-color;
|
|
67
77
|
margin: 4px;
|
|
68
78
|
}
|
|
69
|
-
|
|
79
|
+
|
|
80
|
+
>.filtercontainer>.filterinput {
|
|
70
81
|
border: 0;
|
|
71
82
|
width: 100%;
|
|
72
83
|
font-size: 13px;
|
|
73
84
|
text-indent: 4px;
|
|
74
85
|
padding: 10px 5px;
|
|
75
86
|
}
|
|
76
|
-
|
|
87
|
+
|
|
88
|
+
>.item {
|
|
77
89
|
margin: 0;
|
|
78
90
|
padding: 6px 10px;
|
|
79
91
|
display: flex;
|
|
80
92
|
cursor: pointer;
|
|
81
93
|
justify-content: stretch;
|
|
82
94
|
border-bottom: solid 1px #e1e1e1;
|
|
95
|
+
|
|
83
96
|
&:last-child {
|
|
84
97
|
border-bottom: none;
|
|
85
98
|
}
|
|
99
|
+
|
|
86
100
|
&:hover {
|
|
87
101
|
background-color: $default-hover-color;
|
|
88
102
|
}
|
|
103
|
+
|
|
89
104
|
&.-selected {
|
|
90
105
|
background-color: $default-hover-color;
|
|
91
106
|
}
|
|
107
|
+
|
|
92
108
|
&.-disabled {
|
|
93
109
|
@extend %component-menu-disabled;
|
|
110
|
+
|
|
94
111
|
&:hover {
|
|
95
112
|
background-color: transparent;
|
|
96
113
|
}
|
|
97
114
|
}
|
|
115
|
+
|
|
98
116
|
&.-striped:nth-child(even) {
|
|
99
117
|
background-color: #eee;
|
|
100
118
|
}
|
|
119
|
+
|
|
101
120
|
.menubutton {
|
|
102
121
|
background-color: transparent;
|
|
103
122
|
border: 0;
|
|
@@ -108,16 +127,19 @@
|
|
|
108
127
|
align-items: center;
|
|
109
128
|
width: 100%
|
|
110
129
|
}
|
|
130
|
+
|
|
111
131
|
.menubutton {
|
|
112
|
-
|
|
132
|
+
>.label {
|
|
113
133
|
flex-grow: 1;
|
|
114
134
|
}
|
|
115
|
-
|
|
135
|
+
|
|
136
|
+
>.menuicon {
|
|
116
137
|
margin-right: 5px
|
|
117
138
|
}
|
|
118
139
|
}
|
|
119
140
|
}
|
|
120
|
-
|
|
141
|
+
|
|
142
|
+
>.notfound {
|
|
121
143
|
text-indent: 10px;
|
|
122
144
|
color: graytext;
|
|
123
145
|
font-style: italic;
|
|
@@ -6,31 +6,37 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
6
6
|
@import "commons.scss";
|
|
7
7
|
@import "effects.scss";
|
|
8
8
|
@import "colors.scss";
|
|
9
|
+
|
|
9
10
|
.sidenav-component {
|
|
10
11
|
height: 100%;
|
|
11
12
|
width: 100%;
|
|
12
13
|
overflow: hidden;
|
|
13
14
|
background-color: transparent;
|
|
14
15
|
border: 1px solid #eee;
|
|
16
|
+
|
|
15
17
|
&.-blocked {
|
|
16
18
|
opacity: 0.4;
|
|
17
19
|
pointer-events: none;
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
|
|
22
|
+
>.expandedmenu,
|
|
23
|
+
>.collapsedmenu {
|
|
21
24
|
height: auto;
|
|
22
25
|
width: 100%;
|
|
23
|
-
|
|
26
|
+
|
|
27
|
+
>.item {
|
|
24
28
|
cursor: pointer;
|
|
25
29
|
border-bottom: 1px solid #eee;
|
|
26
30
|
width: 100%;
|
|
27
31
|
transition: all 0.2s ease-in-out;
|
|
32
|
+
|
|
28
33
|
&.-customsidenavitem {
|
|
29
34
|
display: flex;
|
|
30
35
|
align-items: center;
|
|
31
36
|
justify-content: center;
|
|
32
37
|
padding-left: 0px;
|
|
33
|
-
|
|
38
|
+
|
|
39
|
+
>.searchmenubutton {
|
|
34
40
|
width: 100%;
|
|
35
41
|
height: 100%;
|
|
36
42
|
display: flex;
|
|
@@ -38,46 +44,57 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
38
44
|
justify-content: center;
|
|
39
45
|
}
|
|
40
46
|
}
|
|
47
|
+
|
|
41
48
|
&.-customsidenavitem:hover {
|
|
42
49
|
background-color: white;
|
|
43
50
|
}
|
|
51
|
+
|
|
44
52
|
&.-disabled {
|
|
45
53
|
@extend %component-disabled;
|
|
46
54
|
}
|
|
47
55
|
}
|
|
48
|
-
|
|
56
|
+
|
|
57
|
+
>.item:hover {
|
|
49
58
|
background-color: #eee;
|
|
50
59
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
60
|
+
|
|
61
|
+
>.item:hover>.menuicon,
|
|
62
|
+
>.item:hover .searchmenuicon,
|
|
63
|
+
>.item:hover>.menulink>.menuicon,
|
|
64
|
+
>.item:hover>.menulink .searchmenuicon {
|
|
55
65
|
fill: rgb(114, 114, 114);
|
|
56
66
|
}
|
|
57
|
-
|
|
58
|
-
|
|
67
|
+
|
|
68
|
+
>.item:hover>.title,
|
|
69
|
+
>.item:hover>.menulink>.title {
|
|
59
70
|
color: rgb(114, 114, 114);
|
|
60
71
|
}
|
|
61
72
|
}
|
|
62
|
-
|
|
63
|
-
|
|
73
|
+
|
|
74
|
+
>.expandedmenu.customscroll,
|
|
75
|
+
>.collapsedmenu.customscroll {
|
|
64
76
|
overflow-y: auto;
|
|
65
77
|
height: 100%;
|
|
78
|
+
|
|
66
79
|
&::-webkit-scrollbar {
|
|
67
80
|
width: 5px;
|
|
68
81
|
}
|
|
82
|
+
|
|
69
83
|
&::-webkit-scrollbar-track {
|
|
70
84
|
background: rgba(196, 222, 247, 0.5);
|
|
71
85
|
border-radius: 10px;
|
|
72
86
|
}
|
|
87
|
+
|
|
73
88
|
&::-webkit-scrollbar-thumb {
|
|
74
89
|
box-shadow: inset 0 0 5px #cecece;
|
|
75
90
|
border-radius: 10px;
|
|
76
91
|
}
|
|
92
|
+
|
|
77
93
|
&::-webkit-scrollbar-thumb:hover {
|
|
78
94
|
background: rgb(0, 195, 255);
|
|
79
95
|
}
|
|
80
96
|
}
|
|
97
|
+
|
|
81
98
|
.openclosemenu {
|
|
82
99
|
background: #f5f5f5;
|
|
83
100
|
width: 100%;
|
|
@@ -89,14 +106,17 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
89
106
|
align-content: center;
|
|
90
107
|
text-align: center;
|
|
91
108
|
transition: all 0.2s ease-in-out;
|
|
109
|
+
|
|
92
110
|
&:hover {
|
|
93
111
|
background: $border-container;
|
|
94
112
|
}
|
|
113
|
+
|
|
95
114
|
.icon-component {
|
|
96
115
|
justify-self: center;
|
|
97
116
|
width: 12px;
|
|
98
117
|
}
|
|
99
118
|
}
|
|
119
|
+
|
|
100
120
|
&.closefromexpanded {
|
|
101
121
|
background: transparent;
|
|
102
122
|
margin-top: 2px;
|
|
@@ -106,7 +126,7 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
106
126
|
}
|
|
107
127
|
}
|
|
108
128
|
|
|
109
|
-
.sidenav-component
|
|
129
|
+
.sidenav-component>.expandedmenu {
|
|
110
130
|
animation: revealelement 0.3s;
|
|
111
131
|
-moz-animation: revealelement 0.3s;
|
|
112
132
|
background-color: #fff;
|
|
@@ -116,27 +136,32 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
116
136
|
-webkit-box-flex: 0;
|
|
117
137
|
-ms-flex: 0 0 70px;
|
|
118
138
|
flex: 0 0 70px;
|
|
119
|
-
|
|
139
|
+
|
|
140
|
+
>.item {
|
|
120
141
|
align-content: center;
|
|
121
142
|
background-color: #fff;
|
|
122
143
|
display: grid;
|
|
123
144
|
grid-template-columns: 30px 1fr;
|
|
124
145
|
height: 45px;
|
|
125
146
|
padding-left: 5px;
|
|
147
|
+
|
|
126
148
|
&.-withlink {
|
|
127
149
|
grid-template-columns: 1fr;
|
|
128
150
|
}
|
|
151
|
+
|
|
129
152
|
.menulink {
|
|
130
153
|
display: grid;
|
|
131
154
|
grid-template-columns: 30px 1fr;
|
|
132
155
|
align-items: center;
|
|
133
156
|
text-decoration: none;
|
|
134
157
|
}
|
|
135
|
-
|
|
158
|
+
|
|
159
|
+
>.menuicon {
|
|
136
160
|
justify-self: center;
|
|
137
161
|
}
|
|
138
|
-
|
|
139
|
-
|
|
162
|
+
|
|
163
|
+
>.title,
|
|
164
|
+
>.menulink>.title {
|
|
140
165
|
color: #666;
|
|
141
166
|
align-self: center;
|
|
142
167
|
justify-self: left;
|
|
@@ -145,63 +170,76 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
145
170
|
}
|
|
146
171
|
}
|
|
147
172
|
|
|
148
|
-
.sidenav-component
|
|
173
|
+
.sidenav-component>.collapsedmenu {
|
|
149
174
|
display: flex;
|
|
150
175
|
flex-wrap: wrap;
|
|
151
176
|
align-content: flex-start;
|
|
152
|
-
|
|
177
|
+
|
|
178
|
+
>.item {
|
|
153
179
|
height: 50px;
|
|
154
180
|
display: grid;
|
|
155
181
|
grid-template-rows: 1fr;
|
|
156
182
|
align-items: center;
|
|
157
|
-
align-content: center;
|
|
183
|
+
align-content: center;
|
|
184
|
+
|
|
158
185
|
&.-withlink {
|
|
159
186
|
align-items: stretch;
|
|
160
187
|
}
|
|
161
|
-
|
|
188
|
+
|
|
189
|
+
>.menulink {
|
|
162
190
|
display: grid;
|
|
163
191
|
grid-template-rows: 1fr;
|
|
164
192
|
align-items: center;
|
|
165
193
|
}
|
|
166
|
-
|
|
167
|
-
|
|
194
|
+
|
|
195
|
+
>.menuicon,
|
|
196
|
+
>.menulink>.menuicon {
|
|
168
197
|
justify-self: center;
|
|
169
198
|
}
|
|
170
199
|
}
|
|
200
|
+
|
|
171
201
|
&.-small {
|
|
172
202
|
width: 55px;
|
|
173
|
-
|
|
203
|
+
|
|
204
|
+
>.item {
|
|
174
205
|
height: 40px;
|
|
175
206
|
}
|
|
207
|
+
|
|
176
208
|
.-iconcenter {
|
|
177
209
|
width: 55px !important;
|
|
178
210
|
}
|
|
179
211
|
}
|
|
212
|
+
|
|
180
213
|
&.-medium {
|
|
181
214
|
width: 55px;
|
|
182
|
-
|
|
215
|
+
|
|
216
|
+
>.item {
|
|
183
217
|
height: 50px;
|
|
184
218
|
}
|
|
219
|
+
|
|
185
220
|
.-iconcenter {
|
|
186
221
|
width: 65px !important;
|
|
187
222
|
}
|
|
188
223
|
}
|
|
224
|
+
|
|
189
225
|
&.-large {
|
|
190
226
|
width: 75px;
|
|
191
|
-
|
|
227
|
+
|
|
228
|
+
>.item {
|
|
192
229
|
height: 60px;
|
|
193
230
|
}
|
|
231
|
+
|
|
194
232
|
.-iconcenter {
|
|
195
233
|
width: 75px !important;
|
|
196
234
|
}
|
|
197
235
|
}
|
|
198
236
|
}
|
|
199
237
|
|
|
200
|
-
.sidenav-component
|
|
201
|
-
.sidenav-component
|
|
238
|
+
.sidenav-component>.collapsedmenu>.item>.submenu-container,
|
|
239
|
+
.sidenav-component>.expandedmenu>.item>.submenu-container {
|
|
202
240
|
animation: 0.5s ease-in 0s 1 slideLeft;
|
|
203
241
|
-moz-animation: 0.5s ease-in 0s 1 slideLeft;
|
|
204
|
-
background-color: #eee
|
|
242
|
+
background-color: #eee;
|
|
205
243
|
height: auto;
|
|
206
244
|
width: auto;
|
|
207
245
|
float: right;
|
|
@@ -211,7 +249,8 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
211
249
|
-moz-box-shadow: 3px 1px 6px 0px rgba(50, 50, 50, 0.35);
|
|
212
250
|
box-shadow: 3px 1px 6px 0px rgba(50, 50, 50, 0.35);
|
|
213
251
|
z-index: 9999999;
|
|
214
|
-
|
|
252
|
+
|
|
253
|
+
>.title {
|
|
215
254
|
color: #777777;
|
|
216
255
|
font-size: 24px;
|
|
217
256
|
font-weight: bold;
|
|
@@ -219,27 +258,32 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
219
258
|
height: 36px;
|
|
220
259
|
line-height: 36px;
|
|
221
260
|
}
|
|
261
|
+
|
|
222
262
|
.submenu {
|
|
223
263
|
color: #808080;
|
|
224
264
|
display: grid;
|
|
225
265
|
grid-template-columns: repeat(2, 1fr);
|
|
226
266
|
align-content: center;
|
|
227
267
|
align-items: flex-start;
|
|
228
|
-
|
|
268
|
+
|
|
269
|
+
>.item {
|
|
229
270
|
display: grid;
|
|
230
271
|
min-height: 40px;
|
|
231
272
|
align-content: center;
|
|
232
273
|
display: grid;
|
|
233
274
|
margin-left: 20px;
|
|
275
|
+
|
|
234
276
|
&.-disabled {
|
|
235
277
|
@extend %component-disabled;
|
|
236
278
|
background-color: #eee !important;
|
|
237
279
|
}
|
|
238
280
|
}
|
|
239
|
-
|
|
281
|
+
|
|
282
|
+
>.item:hover {
|
|
240
283
|
color: #333;
|
|
241
284
|
}
|
|
242
|
-
|
|
285
|
+
|
|
286
|
+
>.item:before {
|
|
243
287
|
position: absolute;
|
|
244
288
|
content: '';
|
|
245
289
|
left: -15px;
|
|
@@ -248,24 +292,27 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
248
292
|
border-bottom: 5px solid transparent;
|
|
249
293
|
border-left: 5px solid #808080;
|
|
250
294
|
}
|
|
251
|
-
|
|
295
|
+
|
|
296
|
+
>.item:nth-child(even) {
|
|
252
297
|
padding-left: 5px;
|
|
253
298
|
}
|
|
254
|
-
|
|
299
|
+
|
|
300
|
+
>.item>.menulink {
|
|
255
301
|
grid-template-columns: 1fr;
|
|
256
302
|
text-decoration: none;
|
|
257
303
|
}
|
|
258
304
|
}
|
|
259
305
|
}
|
|
260
|
-
|
|
306
|
+
|
|
261
307
|
.searchmenu {
|
|
262
|
-
background-color: #fff
|
|
308
|
+
background-color: #fff;
|
|
263
309
|
border: solid 1px $component-border-color;
|
|
264
310
|
border-radius: 4px;
|
|
265
311
|
width: 300px;
|
|
266
312
|
position: absolute;
|
|
267
313
|
padding: 20px;
|
|
268
|
-
|
|
314
|
+
|
|
315
|
+
>.closebutton {
|
|
269
316
|
cursor: pointer;
|
|
270
317
|
float: right;
|
|
271
318
|
margin: -21px -33px 15px 0px;
|
|
@@ -279,15 +326,19 @@ que utilizam. Em caso de mudança, ficar atento para os refatores.
|
|
|
279
326
|
justify-content: center;
|
|
280
327
|
height: 100%;
|
|
281
328
|
width: 100%;
|
|
282
|
-
|
|
329
|
+
|
|
330
|
+
>.text,
|
|
331
|
+
.subtext {
|
|
283
332
|
color: #a8a8a8;
|
|
284
333
|
text-align: center;
|
|
285
334
|
}
|
|
286
|
-
|
|
335
|
+
|
|
336
|
+
>.text {
|
|
287
337
|
font-size: 26px;
|
|
288
338
|
margin-top: 20px;
|
|
289
339
|
}
|
|
290
|
-
|
|
340
|
+
|
|
341
|
+
>.subtext {
|
|
291
342
|
font-size: 15px;
|
|
292
343
|
margin-top: 5px;
|
|
293
344
|
}
|
|
@@ -25,6 +25,7 @@ var ButtonContainer = function ButtonContainer(_ref) {
|
|
|
25
25
|
position = _ref$position === void 0 ? 'left' : _ref$position,
|
|
26
26
|
children = _ref.children;
|
|
27
27
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
28
|
+
"data-testid": "button-container",
|
|
28
29
|
className: "btn-container ".concat(customClass),
|
|
29
30
|
style: getStyles(style, position)
|
|
30
31
|
}, children);
|
package/lib/dialog/Custom.js
CHANGED
|
@@ -44,7 +44,7 @@ var Custom = function Custom(props) {
|
|
|
44
44
|
className: "title"
|
|
45
45
|
}, props.title), /*#__PURE__*/_react.default.createElement("div", {
|
|
46
46
|
className: "text"
|
|
47
|
-
}, props.text)), /*#__PURE__*/_react.default.createElement(_Footer.default, props, /*#__PURE__*/_react.default.createElement(_buttons.ButtonContainer, {
|
|
47
|
+
}, props.text)), props.buttons && props.buttons.length > 0 && /*#__PURE__*/_react.default.createElement(_Footer.default, props, /*#__PURE__*/_react.default.createElement(_buttons.ButtonContainer, {
|
|
48
48
|
position: "right"
|
|
49
49
|
}, props.buttons.map(function (button) {
|
|
50
50
|
return /*#__PURE__*/_react.default.cloneElement(button, {
|
package/lib/dialog/form/index.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.FormDialogContext = void 0;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
9
10
|
var _base = _interopRequireDefault(require("../base"));
|
|
10
11
|
var _Header = _interopRequireDefault(require("../base/Header"));
|
|
11
12
|
var _index = require("../../buttons/index");
|
|
@@ -67,16 +68,19 @@ var ModalForm = function ModalForm(props) {
|
|
|
67
68
|
handlerClose: props.handlerClose
|
|
68
69
|
}, props))), /*#__PURE__*/_react.default.createElement(_Content.default, {
|
|
69
70
|
styleForContent: _objectSpread(_objectSpread({}, props.styleForContent), overlayStyle)
|
|
70
|
-
}, content || children), getSpinner(), showFooter && /*#__PURE__*/_react.default.createElement(_Footer.default, null, /*#__PURE__*/_react.default.createElement(_index.ButtonContainer, _extends({}, props, {
|
|
71
|
+
}, content || children), getSpinner(), showFooter && props.buttons && props.buttons.length > 0 && /*#__PURE__*/_react.default.createElement(_Footer.default, null, /*#__PURE__*/_react.default.createElement(_index.ButtonContainer, _extends({}, props, {
|
|
71
72
|
style: _objectSpread({}, overlayStyle)
|
|
72
|
-
}),
|
|
73
|
+
}), props.buttons.map(function (button) {
|
|
73
74
|
if (context && context.securityBeforeUnload && button && button.type && button.type.name === 'CancelButton') {
|
|
74
75
|
return /*#__PURE__*/_react.default.cloneElement(button, {
|
|
76
|
+
key: "button-".concat(_uuid.default.v1()),
|
|
75
77
|
onClick: props.handlerClose
|
|
76
78
|
});
|
|
77
79
|
}
|
|
78
|
-
return /*#__PURE__*/_react.default.cloneElement(button
|
|
79
|
-
|
|
80
|
+
return /*#__PURE__*/_react.default.cloneElement(button, {
|
|
81
|
+
key: "button-".concat(_uuid.default.v1())
|
|
82
|
+
});
|
|
83
|
+
})))));
|
|
80
84
|
};
|
|
81
85
|
var _default = (0, _withFormSecurity.default)(ModalForm);
|
|
82
86
|
exports.default = _default;
|
package/lib/dialog/types.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ interface IBaseProps {
|
|
|
31
31
|
}
|
|
32
32
|
interface IFormProps {
|
|
33
33
|
children: ReactNode | ReactNode[];
|
|
34
|
-
buttons
|
|
34
|
+
buttons?: JSX.Element[];
|
|
35
35
|
styleForContent?: CSSProperties;
|
|
36
36
|
title?: string;
|
|
37
37
|
width?: string;
|
|
@@ -61,7 +61,7 @@ interface IQuestionProps {
|
|
|
61
61
|
}
|
|
62
62
|
interface ICustomProps {
|
|
63
63
|
icon: ReactElement;
|
|
64
|
-
buttons
|
|
64
|
+
buttons?: JSX.Element[];
|
|
65
65
|
title?: string;
|
|
66
66
|
text?: string;
|
|
67
67
|
height?: string;
|
package/lib/form/FieldNumber.js
CHANGED
|
@@ -42,6 +42,7 @@ var getEventProps = function getEventProps(_ref) {
|
|
|
42
42
|
},
|
|
43
43
|
onKeyDown: function onKeyDown(e) {
|
|
44
44
|
if ([constants.keyCodes.ENTER].includes(e.keyCode)) {
|
|
45
|
+
handlerFieldChange === null || handlerFieldChange === void 0 ? void 0 : handlerFieldChange(e);
|
|
45
46
|
if (validators) handlerFieldValidade === null || handlerFieldValidade === void 0 ? void 0 : handlerFieldValidade(name, e.target.value, validators);
|
|
46
47
|
if (_onKeyDown) _onKeyDown(e);
|
|
47
48
|
handleShowValidateMessages(true);
|
package/lib/icons/index.d.ts
CHANGED
|
@@ -4,7 +4,11 @@ import '../@types/PointerEvents.js';
|
|
|
4
4
|
import '../@types/SizePixels.js';
|
|
5
5
|
import '../@types/Icon.js';
|
|
6
6
|
import './helper.js';
|
|
7
|
+
import '../@types/Position.js';
|
|
7
8
|
|
|
8
|
-
declare const
|
|
9
|
+
declare const _default: {
|
|
10
|
+
(props: IIconProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
9
13
|
|
|
10
|
-
export {
|
|
14
|
+
export { _default as default };
|
package/lib/icons/index.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
9
|
var _helper = _interopRequireDefault(require("./helper"));
|
|
10
|
+
var _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
|
|
9
11
|
require("../assets/styles/icon.scss");
|
|
10
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
11
15
|
var listIcon = _helper.default;
|
|
12
16
|
var disabledIconColor = 'rgb(193, 193, 193)';
|
|
13
17
|
var Icon = function Icon(_ref) {
|
|
14
|
-
var _getPaths;
|
|
15
18
|
var name = _ref.name,
|
|
16
19
|
_onClick = _ref.onClick,
|
|
17
20
|
svgStruct = _ref.svgStruct,
|
|
@@ -25,34 +28,52 @@ var Icon = function Icon(_ref) {
|
|
|
25
28
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
26
29
|
_ref$customClass = _ref.customClass,
|
|
27
30
|
customClass = _ref$customClass === void 0 ? '' : _ref$customClass,
|
|
31
|
+
_ref$customClassForCo = _ref.customClassForContainer,
|
|
32
|
+
customClassForContainer = _ref$customClassForCo === void 0 ? '' : _ref$customClassForCo,
|
|
28
33
|
_ref$color = _ref.color,
|
|
29
34
|
color = _ref$color === void 0 ? '#676464' : _ref$color,
|
|
30
35
|
_ref$pointerEvents = _ref.pointerEvents,
|
|
31
|
-
pointerEvents = _ref$pointerEvents === void 0 ? 'none' : _ref$pointerEvents
|
|
36
|
+
pointerEvents = _ref$pointerEvents === void 0 ? 'none' : _ref$pointerEvents,
|
|
37
|
+
targetRef = _ref.targetRef,
|
|
38
|
+
tooltip = _ref.tooltip;
|
|
39
|
+
var refSvg = (0, _react.useRef)(null);
|
|
32
40
|
var getPaths = function getPaths() {
|
|
33
41
|
return name ? listIcon[name].paths : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.paths;
|
|
34
42
|
};
|
|
43
|
+
var getSvg = function getSvg() {
|
|
44
|
+
var _getPaths;
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
46
|
+
"data-testid": "icon",
|
|
47
|
+
onClick: function onClick() {
|
|
48
|
+
if (_onClick && !disabled) _onClick();
|
|
49
|
+
},
|
|
50
|
+
ref: function ref(r) {
|
|
51
|
+
refSvg.current = r;
|
|
52
|
+
},
|
|
53
|
+
width: "".concat(size, "px"),
|
|
54
|
+
height: "".concat(size, "px"),
|
|
55
|
+
fill: disabled ? disabledIconColor : color,
|
|
56
|
+
viewBox: name ? listIcon[name].viewbox : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.viewbox,
|
|
57
|
+
className: "icon-component ".concat(customClass),
|
|
58
|
+
pointerEvents: pointerEvents,
|
|
59
|
+
style: style
|
|
60
|
+
}, (_getPaths = getPaths()) === null || _getPaths === void 0 ? void 0 : _getPaths.map(function (value) {
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement("path", {
|
|
62
|
+
"data-testid": "icon-path",
|
|
63
|
+
d: value,
|
|
64
|
+
key: value
|
|
65
|
+
});
|
|
66
|
+
}));
|
|
67
|
+
};
|
|
35
68
|
if (!name && !svgStruct) throw new Error('One of the "name" and "svgStruct" props must be filled');
|
|
36
69
|
if (!visible) return null;
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
fill: disabled ? disabledIconColor : color,
|
|
45
|
-
viewBox: name ? listIcon[name].viewbox : svgStruct === null || svgStruct === void 0 ? void 0 : svgStruct.viewbox,
|
|
46
|
-
className: "icon-component ".concat(customClass),
|
|
47
|
-
pointerEvents: pointerEvents,
|
|
48
|
-
style: style
|
|
49
|
-
}, (_getPaths = getPaths()) === null || _getPaths === void 0 ? void 0 : _getPaths.map(function (value) {
|
|
50
|
-
return /*#__PURE__*/_react.default.createElement("path", {
|
|
51
|
-
"data-testid": "icon-path",
|
|
52
|
-
d: value,
|
|
53
|
-
key: value
|
|
54
|
-
});
|
|
55
|
-
}));
|
|
70
|
+
if (!tooltip) return getSvg();
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
72
|
+
className: "icon-component-container ".concat(customClassForContainer),
|
|
73
|
+
ref: function ref(r) {
|
|
74
|
+
if (targetRef && r) targetRef(r);
|
|
75
|
+
}
|
|
76
|
+
}, getSvg());
|
|
56
77
|
};
|
|
57
|
-
var _default = Icon;
|
|
78
|
+
var _default = (0, _withTooltip.default)(Icon);
|
|
58
79
|
exports.default = _default;
|
package/lib/icons/types.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { CSSProperties } from 'react';
|
|
|
2
2
|
import { PointerEvents } from '../@types/PointerEvents.js';
|
|
3
3
|
import { SizePixels } from '../@types/SizePixels.js';
|
|
4
4
|
import { IconNames } from '../@types/Icon.js';
|
|
5
|
+
import { Position } from '../@types/Position.js';
|
|
5
6
|
import './helper.js';
|
|
6
7
|
|
|
7
8
|
type ListIconType = {
|
|
@@ -14,6 +15,7 @@ interface IIconProps {
|
|
|
14
15
|
size?: SizePixels;
|
|
15
16
|
color?: string;
|
|
16
17
|
customClass?: string;
|
|
18
|
+
customClassForContainer?: string;
|
|
17
19
|
style?: CSSProperties;
|
|
18
20
|
visible?: boolean;
|
|
19
21
|
disabled?: boolean;
|
|
@@ -25,6 +27,10 @@ interface IIconProps {
|
|
|
25
27
|
paths: Array<string>;
|
|
26
28
|
};
|
|
27
29
|
onClick?: () => void;
|
|
30
|
+
tooltipPosition?: Exclude<Position, 'center'>;
|
|
31
|
+
tooltipWidth?: string | number;
|
|
32
|
+
tooltip?: string;
|
|
33
|
+
targetRef?: (ref: HTMLDivElement) => void;
|
|
28
34
|
}
|
|
29
35
|
|
|
30
36
|
export { IIconProps, ListIconType };
|
|
@@ -71,7 +71,6 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
71
71
|
_onDragOver = props.onDragOver,
|
|
72
72
|
_onDrop = props.onDrop,
|
|
73
73
|
_onDragLeave = props.onDragLeave,
|
|
74
|
-
_onClick = props.onClick,
|
|
75
74
|
readOnlyClass = props.readOnlyClass;
|
|
76
75
|
var propsInput;
|
|
77
76
|
var options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
@@ -149,9 +148,6 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
149
148
|
},
|
|
150
149
|
onDragLeave: function onDragLeave(e) {
|
|
151
150
|
if (_onDragLeave) _onDragLeave(e);
|
|
152
|
-
},
|
|
153
|
-
onClick: function onClick(e) {
|
|
154
|
-
if (_onClick) _onClick(e);
|
|
155
151
|
}
|
|
156
152
|
});
|
|
157
153
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { KeyboardEvent, DragEvent, MutableRefObject, RefObject, CSSProperties } from 'react';
|
|
2
2
|
import { TextAlign } from '../../@types/Align.js';
|
|
3
3
|
import { Period } from '../../@types/Period.js';
|
|
4
4
|
import { PermissionAttr, OnDenied } from '../../@types/PermissionAttr.js';
|
|
@@ -33,7 +33,6 @@ interface IBaseProps {
|
|
|
33
33
|
maxLength?: number;
|
|
34
34
|
name?: string;
|
|
35
35
|
required?: boolean;
|
|
36
|
-
onClick?: (event: MouseEvent) => void;
|
|
37
36
|
onBlur?: (e: CustomInputEvent) => void;
|
|
38
37
|
onFocus?: (e: CustomInputEvent) => void;
|
|
39
38
|
onReset?: (e: CustomInputEvent) => void;
|
|
@@ -80,20 +80,20 @@ var MultipleSelect = function MultipleSelect(props) {
|
|
|
80
80
|
var selectWrapper = (0, _react.useRef)();
|
|
81
81
|
var gridElRef = (0, _react.useRef)();
|
|
82
82
|
var descriptionKeyIsString = typeof descriptionKey === 'string';
|
|
83
|
-
var insideComponents = ['item', 'menubutton', 'filterinput', 'filtercontainer', 'label', 'actionbutton'];
|
|
84
83
|
var onScreenResize = function onScreenResize() {
|
|
85
84
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
86
85
|
};
|
|
87
86
|
var onClickOutside = function onClickOutside(event) {
|
|
88
87
|
var target = event.target;
|
|
89
|
-
if (
|
|
88
|
+
if (target !== selectWrapper.current && selectWrapper.current && !selectWrapper.current.contains(target) && dropdownRef.current && !dropdownRef.current.contains(target)) {
|
|
90
89
|
setOpened(false);
|
|
91
90
|
}
|
|
92
91
|
};
|
|
93
92
|
var onMouseMove = function onMouseMove(event) {
|
|
94
93
|
var target = event.target;
|
|
95
94
|
if (target.className === '') return;
|
|
96
|
-
|
|
95
|
+
var insideComponents = ['item', 'menubutton', 'filterinput', 'filtercontainer', 'label'].includes(target.className);
|
|
96
|
+
setInsideComponent(insideComponents);
|
|
97
97
|
};
|
|
98
98
|
var onClearClick = function onClearClick() {
|
|
99
99
|
setSelected(undefined);
|
|
@@ -123,26 +123,19 @@ var MultipleSelect = function MultipleSelect(props) {
|
|
|
123
123
|
setInputValue([filteredValue]);
|
|
124
124
|
}
|
|
125
125
|
};
|
|
126
|
-
var _onFocus = function onFocus() {
|
|
127
|
-
var dropdownWidthFocus = selectWrapper.current ? selectWrapper.current.clientWidth : dropdownWidth;
|
|
128
|
-
setOpened(true);
|
|
129
|
-
setDropdownWidth(dropdownWidthFocus);
|
|
130
|
-
};
|
|
131
126
|
var onSelect = function onSelect(select) {
|
|
132
|
-
var _dropdownRef$current;
|
|
133
127
|
if (select === null) return;
|
|
134
128
|
var currentsSelect = [].concat(_toConsumableArray(currents), [select]);
|
|
135
129
|
setCurrents(currentsSelect);
|
|
136
130
|
setDataCombo(dataSource);
|
|
137
131
|
setInputValue([]);
|
|
132
|
+
setOpened(false);
|
|
138
133
|
if (props.onSelect) setSelected(props.onSelect(currentsSelect.map(function (i) {
|
|
139
134
|
return i[idKey];
|
|
140
135
|
})));
|
|
141
|
-
(_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.focus();
|
|
142
136
|
};
|
|
143
137
|
var onUnselect = function onUnselect(id) {
|
|
144
138
|
if (currents) {
|
|
145
|
-
var _dropdownRef$current2;
|
|
146
139
|
var result = currents.filter(function (item) {
|
|
147
140
|
return item[idKey] !== id;
|
|
148
141
|
});
|
|
@@ -150,13 +143,17 @@ var MultipleSelect = function MultipleSelect(props) {
|
|
|
150
143
|
if (props.onSelect) setSelected(props.onSelect(result.map(function (i) {
|
|
151
144
|
return i[idKey];
|
|
152
145
|
})));
|
|
153
|
-
(_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : _dropdownRef$current2.focus();
|
|
154
146
|
}
|
|
155
147
|
};
|
|
156
148
|
var onOpenClose = function onOpenClose() {
|
|
157
149
|
setOpened(!opened);
|
|
158
150
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
159
151
|
};
|
|
152
|
+
var _onFocus = function onFocus() {
|
|
153
|
+
var dropdownWidthFocus = selectWrapper.current ? selectWrapper.current.clientWidth : dropdownWidth;
|
|
154
|
+
setOpened(true);
|
|
155
|
+
setDropdownWidth(dropdownWidthFocus);
|
|
156
|
+
};
|
|
160
157
|
var _onBlur = function onBlur(e) {
|
|
161
158
|
if (props.onBlur) props.onBlur(e);
|
|
162
159
|
if (!insideComponent) setOpened(false);
|
|
@@ -167,20 +164,20 @@ var MultipleSelect = function MultipleSelect(props) {
|
|
|
167
164
|
if (!currents.includes(selected)) onSelect(selected);
|
|
168
165
|
} else if ([constants.keyCodes.ARROW_UP, constants.keyCodes.ARROW_DOWN].includes(e.keyCode)) {
|
|
169
166
|
if (!opened) setOpened(true);
|
|
170
|
-
var index =
|
|
167
|
+
var index = dataSource ? dataSource.findIndex(function (d) {
|
|
171
168
|
return d === selected;
|
|
172
169
|
}) : 0;
|
|
173
170
|
if (e.keyCode === constants.keyCodes.ARROW_DOWN) {
|
|
174
|
-
index =
|
|
171
|
+
index = dataSource && index === dataSource.length - 1 ? 0 : index + 1;
|
|
175
172
|
} else {
|
|
176
|
-
index =
|
|
173
|
+
index = dataSource && index === 0 ? dataSource.length - 1 : index - 1;
|
|
177
174
|
}
|
|
178
|
-
if (
|
|
179
|
-
if (descriptionKeyIsString &&
|
|
180
|
-
setInputValue(
|
|
181
|
-
} else if (!descriptionKeyIsString) setInputValue([descriptionKey(
|
|
175
|
+
if (dataSource && dataSource.length) {
|
|
176
|
+
if (descriptionKeyIsString && dataSource[index][descriptionKey]) {
|
|
177
|
+
setInputValue(dataSource[index][descriptionKey]);
|
|
178
|
+
} else if (!descriptionKeyIsString) setInputValue([descriptionKey(dataSource[index])]);
|
|
182
179
|
}
|
|
183
|
-
if (
|
|
180
|
+
if (dataSource) setSelected(dataSource[index]);
|
|
184
181
|
} else if (e.keyCode === constants.keyCodes.BACKSPACE) {
|
|
185
182
|
if (inputValue.length === 0) {
|
|
186
183
|
var currentsKeyDown = _lodash.default.dropRight(currents);
|
|
@@ -189,8 +186,6 @@ var MultipleSelect = function MultipleSelect(props) {
|
|
|
189
186
|
return i[idKey];
|
|
190
187
|
}));
|
|
191
188
|
}
|
|
192
|
-
} else if (e.keyCode === constants.keyCodes.TAB) {
|
|
193
|
-
setOpened(false);
|
|
194
189
|
}
|
|
195
190
|
}
|
|
196
191
|
};
|
|
@@ -257,8 +252,6 @@ var MultipleSelect = function MultipleSelect(props) {
|
|
|
257
252
|
onChange: function onChange(e) {
|
|
258
253
|
if (e) onFilter(e.target.value);
|
|
259
254
|
},
|
|
260
|
-
onClick: _onFocus,
|
|
261
|
-
inputRef: dropdownRef,
|
|
262
255
|
onKeyDown: onInputKeyDown,
|
|
263
256
|
customClassForWrapper: "selectwrapper ".concat((props.readOnly || shouldDisable() || shouldBeReadOnly()) && ' -undigitable'),
|
|
264
257
|
customClassForInputContent: "multiselect",
|
|
@@ -154,13 +154,11 @@ var SimpleSelect = function SimpleSelect(props) {
|
|
|
154
154
|
}
|
|
155
155
|
};
|
|
156
156
|
var onSelect = function onSelect(selectedDropdown) {
|
|
157
|
-
var _dropdownRef$current2;
|
|
158
157
|
if (selectedDropdown === undefined) return;
|
|
159
158
|
setOpened(false);
|
|
160
159
|
setSelected(selectedDropdown);
|
|
161
160
|
if (descriptionKeyIsString) setInputText(selectedDropdown[descriptionKey]);else setInputText(descriptionKey(selectedDropdown));
|
|
162
161
|
onChange(selectedDropdown);
|
|
163
|
-
(_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : _dropdownRef$current2.focus();
|
|
164
162
|
};
|
|
165
163
|
var onOpenClose = function onOpenClose() {
|
|
166
164
|
setOpened(!opened);
|
|
@@ -283,8 +281,6 @@ var SimpleSelect = function SimpleSelect(props) {
|
|
|
283
281
|
onChange: function onChange(e) {
|
|
284
282
|
if (e) onFilter(e.target.value);
|
|
285
283
|
},
|
|
286
|
-
onClick: onFocus,
|
|
287
|
-
inputRef: dropdownRef,
|
|
288
284
|
onKeyDown: onInputKeyDown,
|
|
289
285
|
customClassForWrapper: "selectwrapper ".concat((undigitable || searchOnDropdown || shouldBeReadOnly()) && ' -undigitable'),
|
|
290
286
|
customClassForInputContent: "multiselect",
|
package/lib/inputs/types.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ interface ISearchProps extends IBaseProps {
|
|
|
19
19
|
resetButton?: boolean;
|
|
20
20
|
onReset?: (event?: CustomInputEvent) => void;
|
|
21
21
|
onChange?: (event?: CustomInputEvent) => void;
|
|
22
|
-
onClick?: (event: MouseEvent<
|
|
22
|
+
onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
|
|
23
23
|
textAlign?: TextAlign;
|
|
24
24
|
disabled?: boolean;
|
|
25
25
|
readOnly?: boolean;
|
|
@@ -110,7 +110,6 @@ interface IDropdownSelectProps {
|
|
|
110
110
|
handleOnKeydown: (e: CustomInputEvent | KeyboardEvent) => void;
|
|
111
111
|
handleOnBlur: (item: DataCombo) => void;
|
|
112
112
|
handleOnFocus: () => void;
|
|
113
|
-
handlerSelecionadoAgora?: (bool: boolean) => void;
|
|
114
113
|
opened: boolean;
|
|
115
114
|
dropdownRef: MutableRefObject<HTMLDivElement | null>;
|
|
116
115
|
dataCombo: DataCombo[];
|
|
@@ -84,6 +84,7 @@ var NavMenuItem = function NavMenuItem(props) {
|
|
|
84
84
|
}), /*#__PURE__*/_react.default.createElement(_react.Fragment, null, iconName && /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
85
85
|
name: iconName,
|
|
86
86
|
size: menuSize === 'small' && 16 || menuSize === 'medium' && 24 || menuSize === 'large' && 32 || 16,
|
|
87
|
+
customClassForContainer: "menuicon-container",
|
|
87
88
|
customClass: "menuicon"
|
|
88
89
|
}), isExpanded && /*#__PURE__*/_react.default.createElement("span", {
|
|
89
90
|
className: "title"
|