linear-react-components-ui 0.4.76-beta.11 → 0.4.76-beta.12
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/.vscode/settings.json +2 -1
- package/README.md +0 -33
- package/lib/assets/styles/dropdown.scss +2 -28
- package/lib/assets/styles/effects.scss +0 -12
- package/lib/assets/styles/floatMenu.scss +1 -0
- package/lib/assets/styles/panel.scss +1 -0
- package/lib/assets/styles/progress.scss +1 -8
- package/lib/assets/styles/select.scss +0 -1
- package/lib/assets/styles/table.scss +5 -13
- package/lib/assets/styles/tabs.scss +44 -79
- package/lib/assets/styles/treeview.scss +0 -32
- package/lib/avatar/avatar.spec.js +6 -17
- package/lib/avatar/index.js +1 -1
- package/lib/buttons/DefaultButton.js +1 -7
- package/lib/checkbox/index.js +6 -20
- package/lib/dialog/base/index.js +6 -15
- package/lib/dialog/form/index.js +3 -16
- package/lib/drawer/index.js +1 -4
- package/lib/form/Field.js +0 -2
- package/lib/form/FieldNumber.js +2 -10
- package/lib/form/helpers.js +1 -9
- package/lib/form/index.js +222 -209
- package/lib/form/withFieldHOC.js +0 -2
- package/lib/icons/helper.js +0 -16
- package/lib/inputs/base/helpers.js +10 -15
- package/lib/inputs/date/Dropdown.js +3 -3
- package/lib/inputs/date/index.js +9 -10
- package/lib/inputs/number/BaseNumber.js +1 -1
- package/lib/inputs/number/index.js +5 -7
- package/lib/inputs/select/Dropdown.js +4 -4
- package/lib/inputs/select/index.js +3 -26
- package/lib/inputs/select/multiple/index.js +7 -9
- package/lib/inputs/select/simple/index.js +18 -30
- package/lib/internals/withTooltip.js +81 -85
- package/lib/list/Item.js +3 -3
- package/lib/list/index.js +10 -20
- package/lib/list/list.spec.js +85 -129
- package/lib/menus/float/MenuItem.js +8 -25
- package/lib/menus/sidenav/index.js +3 -7
- package/lib/menus/sidenav/popup_menu_search/index.js +1 -1
- package/lib/progress/Bar.js +9 -40
- package/lib/progress/index.js +4 -12
- package/lib/spinner/index.js +1 -6
- package/lib/split/Split.js +11 -5
- package/lib/table/Row.js +1 -1
- package/lib/tabs/Menu.js +5 -18
- package/lib/tabs/MenuItems.js +7 -7
- package/lib/tabs/Panel.js +3 -1
- package/lib/tabs/index.js +20 -151
- package/lib/tabs/tabs.spec.js +5 -8
- package/lib/toolbar/index.js +4 -8
- package/lib/tooltip/index.js +7 -20
- package/lib/treeview/Node.js +48 -347
- package/lib/treeview/index.js +35 -456
- package/package.json +8 -9
- package/.tool-versions +0 -1
- package/lib/assets/styles/multiSelect.scss +0 -105
- package/lib/assets/styles/periodpicker.scss +0 -65
- package/lib/checkbox/Label.js +0 -37
- package/lib/form/FieldPeriod.js +0 -100
- package/lib/form/withFormSecurity.js +0 -106
- package/lib/inputs/date/helpers.js +0 -36
- package/lib/inputs/multiSelect/ActionButtons.js +0 -68
- package/lib/inputs/multiSelect/Dropdown.js +0 -200
- package/lib/inputs/multiSelect/helper.js +0 -18
- package/lib/inputs/multiSelect/index.js +0 -343
- package/lib/inputs/period/Dialog.js +0 -38
- package/lib/inputs/period/Dropdown.js +0 -90
- package/lib/inputs/period/PeriodList.js +0 -79
- package/lib/inputs/period/helper.js +0 -118
- package/lib/inputs/period/index.js +0 -490
- package/lib/tabs/DropdownItems.js +0 -84
package/.vscode/settings.json
CHANGED
package/README.md
CHANGED
|
@@ -36,39 +36,6 @@ Compilar para publicação:
|
|
|
36
36
|
|
|
37
37
|
`npm run demo:prod`
|
|
38
38
|
|
|
39
|
-
### Publicação da lib no NPM
|
|
40
|
-
A princípio precisaremos fazer o login no npm para isso rode o comando abaixo:
|
|
41
|
-
|
|
42
|
-
`npm login`
|
|
43
|
-
|
|
44
|
-
Para gerar uma build nova e fazer a publicação no npm rode os comandos a seguir:
|
|
45
|
-
|
|
46
|
-
`npm version <versão>`
|
|
47
|
-
|
|
48
|
-
`npm run publish:npm`
|
|
49
|
-
|
|
50
|
-
Caso queira gerar uma build com versão beta e fazer a publicação no npm rode os comandos da seguinte forma:
|
|
51
|
-
|
|
52
|
-
`npm version <versão>`
|
|
53
|
-
|
|
54
|
-
`npm run publish:npm --tag beta`
|
|
55
|
-
|
|
56
|
-
Caso queira gerar uma build com versão candidata e fazer a publicação no npm rode os comandos da seguinte forma:
|
|
57
|
-
|
|
58
|
-
`npm version <versão>`
|
|
59
|
-
|
|
60
|
-
`npm run publish:npm --tag rc`
|
|
61
|
-
|
|
62
|
-
no local onde esta denominado o campo versão, você deverá colocar a nova versão do pacote, alguns exemplos para o campo versão:
|
|
63
|
-
- release: 0.4.75
|
|
64
|
-
- beta: 0.4.75-beta.0
|
|
65
|
-
- candidata: 0.4.75-rc.0
|
|
66
|
-
|
|
67
|
-
ficando da seguinte maneira:
|
|
68
|
-
|
|
69
|
-
`npm version 0.4.75`
|
|
70
|
-
|
|
71
|
-
|
|
72
39
|
### Publicar versão de demonstração no Heroku
|
|
73
40
|
|
|
74
41
|
|
|
@@ -76,12 +76,12 @@
|
|
|
76
76
|
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.2);
|
|
77
77
|
animation: revealelement 0.3s forwards ease-in-out;
|
|
78
78
|
margin-right: 7px;
|
|
79
|
-
> .
|
|
79
|
+
> .floatmenulink {
|
|
80
80
|
text-decoration: none;
|
|
81
81
|
color: #666666;
|
|
82
82
|
text-align: center;
|
|
83
83
|
}
|
|
84
|
-
> .
|
|
84
|
+
> .floatmenulink .-items {
|
|
85
85
|
border: solid 1px $default-hover-color;
|
|
86
86
|
margin: 0 5px 5px 0;
|
|
87
87
|
font-size: 12px;
|
|
@@ -106,32 +106,6 @@
|
|
|
106
106
|
transition: all 0.2s ease-in-out;
|
|
107
107
|
&:hover {
|
|
108
108
|
background: $default-hover-color;
|
|
109
|
-
|
|
110
|
-
> .floatmenudropdown {
|
|
111
|
-
visibility: visible;
|
|
112
|
-
pointer-events: initial;
|
|
113
|
-
opacity: 1;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
> .floatmenudropdown {
|
|
117
|
-
position: absolute;
|
|
118
|
-
padding: 0;
|
|
119
|
-
top: 5px;
|
|
120
|
-
right: 5px;
|
|
121
|
-
visibility: hidden;
|
|
122
|
-
opacity: 0;
|
|
123
|
-
pointer-events: none;
|
|
124
|
-
}
|
|
125
|
-
> .floatmenulink {
|
|
126
|
-
display: flex;
|
|
127
|
-
flex-direction: column;
|
|
128
|
-
align-items: center;
|
|
129
|
-
justify-content: center;
|
|
130
|
-
flex: 1;
|
|
131
|
-
width: 100%;
|
|
132
|
-
text-decoration: none;
|
|
133
|
-
color: #666666;
|
|
134
|
-
text-align: center;
|
|
135
109
|
}
|
|
136
110
|
&.iconcontainer {
|
|
137
111
|
padding-bottom: 10px;
|
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
@keyframes slideInFromTop {
|
|
3
3
|
0% {
|
|
4
4
|
transform: translateY(-60%);
|
|
5
|
-
-webkit-font-smoothing: subpixel-antialiased;
|
|
6
5
|
}
|
|
7
6
|
30% {
|
|
8
7
|
transform: translateY(0);
|
|
9
|
-
-webkit-font-smoothing: subpixel-antialiased;
|
|
10
8
|
}
|
|
11
9
|
}
|
|
12
10
|
|
|
@@ -721,13 +719,3 @@
|
|
|
721
719
|
-webkit-transform: scale(1.1);
|
|
722
720
|
transform: scale(1.1);
|
|
723
721
|
}
|
|
724
|
-
|
|
725
|
-
// SlideWithPosition
|
|
726
|
-
@keyframes slideWithPositionFromLeft {
|
|
727
|
-
from {
|
|
728
|
-
left: -100%;
|
|
729
|
-
}
|
|
730
|
-
to {
|
|
731
|
-
left: 100%;
|
|
732
|
-
}
|
|
733
|
-
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
@import "colors.scss";
|
|
2
2
|
@import "commons.scss";
|
|
3
|
-
|
|
4
3
|
.container-progress {
|
|
5
4
|
display: flex;
|
|
6
5
|
overflow: hidden;
|
|
6
|
+
height: 24px;
|
|
7
7
|
margin-bottom: 20px;
|
|
8
8
|
background-color: #f5f5f5;
|
|
9
9
|
border-radius: 4px;
|
|
10
10
|
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
|
11
11
|
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
|
|
12
|
-
position: relative;
|
|
13
12
|
}
|
|
14
13
|
|
|
15
14
|
.bar {
|
|
@@ -51,12 +50,6 @@
|
|
|
51
50
|
-o-animation: progress-bar-stripes 2s linear infinite;
|
|
52
51
|
animation: progress-bar-stripes 2s linear infinite;
|
|
53
52
|
}
|
|
54
|
-
&.-indeterminate {
|
|
55
|
-
animation: slideWithPositionFromLeft infinite;
|
|
56
|
-
position: absolute;
|
|
57
|
-
left: -100%;
|
|
58
|
-
top: 0;
|
|
59
|
-
}
|
|
60
53
|
>.progressbar-label {
|
|
61
54
|
display: flex;
|
|
62
55
|
align-items: center;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
@import "colors.scss";
|
|
2
2
|
@import "effects.scss";
|
|
3
|
-
|
|
4
|
-
.table-component,
|
|
5
|
-
.innertable {
|
|
6
|
-
contain: strict;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
3
|
.table-component {
|
|
10
4
|
width: 100%;
|
|
11
5
|
max-width: 100%;
|
|
@@ -14,8 +8,7 @@
|
|
|
14
8
|
font-size: 14px;
|
|
15
9
|
max-height: 20em;
|
|
16
10
|
position: relative;
|
|
17
|
-
> .headercontainer,
|
|
18
|
-
.bodycontainer {
|
|
11
|
+
> .headercontainer, .bodycontainer {
|
|
19
12
|
width: 100%;
|
|
20
13
|
.innertable {
|
|
21
14
|
width: 100%;
|
|
@@ -38,8 +31,7 @@
|
|
|
38
31
|
vertical-align: middle;
|
|
39
32
|
border-bottom: 1px solid $component-border-color-soft;
|
|
40
33
|
line-height: 18px;
|
|
41
|
-
> .hidden,
|
|
42
|
-
> .rowhover {
|
|
34
|
+
> .hidden, > .rowhover {
|
|
43
35
|
display: none;
|
|
44
36
|
animation: revealelement 0.2s forwards ease-in-out;
|
|
45
37
|
}
|
|
@@ -47,7 +39,7 @@
|
|
|
47
39
|
border-bottom: 0;
|
|
48
40
|
}
|
|
49
41
|
}
|
|
50
|
-
|
|
42
|
+
|
|
51
43
|
> .bodycontainer > .innertable > .tbody > .trow,
|
|
52
44
|
> .tbody > .trow {
|
|
53
45
|
&.-selected {
|
|
@@ -56,7 +48,7 @@
|
|
|
56
48
|
}
|
|
57
49
|
&:hover {
|
|
58
50
|
> .rowcolumn > .rowhover {
|
|
59
|
-
display: table
|
|
51
|
+
display: table
|
|
60
52
|
}
|
|
61
53
|
}
|
|
62
54
|
}
|
|
@@ -92,7 +84,7 @@
|
|
|
92
84
|
background: $header-container-bg;
|
|
93
85
|
}
|
|
94
86
|
> .headercontainer > .innertable > .theader,
|
|
95
|
-
> .theader {
|
|
87
|
+
> .theader {
|
|
96
88
|
background: $header-container-bg;
|
|
97
89
|
}
|
|
98
90
|
}
|
|
@@ -1,29 +1,4 @@
|
|
|
1
1
|
@import "colors.scss";
|
|
2
|
-
%tab-closepanel {
|
|
3
|
-
background-color: transparent;
|
|
4
|
-
border: 0;
|
|
5
|
-
height: 20px;
|
|
6
|
-
margin-right: 5px;
|
|
7
|
-
padding: 0;
|
|
8
|
-
text-shadow: 0 1px 0 $font-color-second;
|
|
9
|
-
width: 20px;
|
|
10
|
-
visibility: hidden;
|
|
11
|
-
transition: all 0.2s ease-in-out;
|
|
12
|
-
border-radius: 4px;
|
|
13
|
-
&:after {
|
|
14
|
-
content: "×";
|
|
15
|
-
font-size: 20px;
|
|
16
|
-
text-shadow: none;
|
|
17
|
-
color: $font-color-soft;
|
|
18
|
-
transition: all 0.2s ease-in-out;
|
|
19
|
-
}
|
|
20
|
-
&:hover {
|
|
21
|
-
background-color: $color-light-dark;
|
|
22
|
-
&:after {
|
|
23
|
-
color: $font-color-second;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
2
|
%tab-component-menus {
|
|
28
3
|
.menu {
|
|
29
4
|
-webkit-box-shadow: 0px -1px 0px $component-border-color inset;
|
|
@@ -32,26 +7,22 @@
|
|
|
32
7
|
display: flex;
|
|
33
8
|
flex-wrap: nowrap;
|
|
34
9
|
justify-content: center;
|
|
35
|
-
flex: 1;
|
|
10
|
+
flex-grow: 1;
|
|
36
11
|
&.-firsttabident > .menuitem:first-child {
|
|
37
12
|
margin-left: 15px;
|
|
38
13
|
}
|
|
39
14
|
}
|
|
40
|
-
.menu
|
|
15
|
+
.menu > .menuitem {
|
|
41
16
|
border-bottom: 0;
|
|
42
|
-
border-radius: 5px 5px 0px 0px;
|
|
43
|
-
-moz-border-radius: 5px 5px 0px 0px;
|
|
44
|
-
-webkit-border-radius: 5px 5px 0px 0px;
|
|
17
|
+
border-radius: 5px 5px 0px 0px;
|
|
18
|
+
-moz-border-radius: 5px 5px 0px 0px;
|
|
19
|
+
-webkit-border-radius: 5px 5px 0px 0px;
|
|
45
20
|
text-shadow: 0 1px $font-color-second;
|
|
46
21
|
cursor: pointer;
|
|
47
22
|
line-height: 20px;
|
|
48
23
|
margin-right: 1px;
|
|
49
24
|
padding: 0;
|
|
50
25
|
width: auto;
|
|
51
|
-
min-width: 100px;
|
|
52
|
-
display: flex;
|
|
53
|
-
justify-content: space-between;
|
|
54
|
-
align-items: center;
|
|
55
26
|
&.selected {
|
|
56
27
|
border: 1px solid $component-border-color;
|
|
57
28
|
background: $font-color-second;
|
|
@@ -60,22 +31,40 @@
|
|
|
60
31
|
box-shadow: 0;
|
|
61
32
|
font-weight: bold; /* z-index: 2; */
|
|
62
33
|
}
|
|
63
|
-
&.selected > .closepanel,
|
|
64
|
-
&:hover > .closepanel {
|
|
34
|
+
&.selected > .closepanel, &:hover > .closepanel {
|
|
65
35
|
visibility: visible;
|
|
66
36
|
}
|
|
67
37
|
}
|
|
68
|
-
.menu
|
|
69
|
-
white-space: nowrap;
|
|
70
|
-
text-overflow: ellipsis;
|
|
38
|
+
.menu > .menuitem > .menubutton {
|
|
71
39
|
background: transparent;
|
|
72
40
|
border: 0;
|
|
73
41
|
}
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
42
|
+
.menu > .menuitem > .closepanel {
|
|
43
|
+
background-color: transparent;
|
|
44
|
+
border: 0;
|
|
45
|
+
float: right;
|
|
46
|
+
height: 20px;
|
|
47
|
+
margin: 5px 5px 0 0;
|
|
48
|
+
padding: 0;
|
|
49
|
+
text-shadow: 0 1px 0 $font-color-second;
|
|
50
|
+
width: 20px;
|
|
51
|
+
visibility: hidden;
|
|
52
|
+
transition: all 0.2s ease-in-out;
|
|
53
|
+
border-radius: 4px;
|
|
54
|
+
&:after {
|
|
55
|
+
content: "×";
|
|
56
|
+
font-size: 20px;
|
|
57
|
+
text-shadow: none;
|
|
58
|
+
color: $font-color-soft;
|
|
59
|
+
transition: all 0.2s ease-in-out;
|
|
60
|
+
}
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: $color-light-dark;
|
|
63
|
+
&:after {
|
|
64
|
+
color: $font-color-second;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
77
67
|
}
|
|
78
|
-
|
|
79
68
|
.menubar {
|
|
80
69
|
width: auto;
|
|
81
70
|
border-bottom: 1px solid #dae1e8;
|
|
@@ -95,13 +84,8 @@
|
|
|
95
84
|
> .menucontainer {
|
|
96
85
|
display: flex;
|
|
97
86
|
flex-wrap: nowrap;
|
|
98
|
-
|
|
99
|
-
overflow: hidden;
|
|
87
|
+
width: 100%;
|
|
100
88
|
@extend %tab-component-menus;
|
|
101
|
-
> .dropdownbutton {
|
|
102
|
-
border-bottom: 1px solid $component-border-color;
|
|
103
|
-
padding: 0 0.8rem;
|
|
104
|
-
}
|
|
105
89
|
}
|
|
106
90
|
> .panel {
|
|
107
91
|
background-color: $font-color-second;
|
|
@@ -127,9 +111,9 @@
|
|
|
127
111
|
justify-content: center;
|
|
128
112
|
}
|
|
129
113
|
> .menu > .menuitem {
|
|
130
|
-
border-radius: 5px 0px 0px 5px;
|
|
131
|
-
-moz-border-radius: 5px 0px 0px 5px;
|
|
132
|
-
-webkit-border-radius: 5px 0px 0px 5px;
|
|
114
|
+
border-radius: 5px 0px 0px 5px;
|
|
115
|
+
-moz-border-radius: 5px 0px 0px 5px;
|
|
116
|
+
-webkit-border-radius: 5px 0px 0px 5px;
|
|
133
117
|
&.selected {
|
|
134
118
|
border: 1px solid $component-border-color;
|
|
135
119
|
border-right: 1px solid $font-color-second;
|
|
@@ -137,8 +121,8 @@
|
|
|
137
121
|
width: 100%;
|
|
138
122
|
}
|
|
139
123
|
}
|
|
140
|
-
> .menu
|
|
141
|
-
float: left
|
|
124
|
+
> .menu > .menuitem > .closepanel {
|
|
125
|
+
float: left
|
|
142
126
|
}
|
|
143
127
|
> .panel {
|
|
144
128
|
border-top: 1px solid $component-border-color;
|
|
@@ -155,9 +139,9 @@
|
|
|
155
139
|
box-shadow: 0 1px 1px 0px $component-border-color inset;
|
|
156
140
|
}
|
|
157
141
|
> .menu > .menuitem {
|
|
158
|
-
border-radius: 0px 0px 5px 5px;
|
|
159
|
-
-moz-border-radius: 0px 0px 5px 5px;
|
|
160
|
-
-webkit-border-radius: 0px 0px 5px 5px;
|
|
142
|
+
border-radius: 0px 0px 5px 5px;
|
|
143
|
+
-moz-border-radius: 0px 0px 5px 5px;
|
|
144
|
+
-webkit-border-radius: 0px 0px 5px 5px;
|
|
161
145
|
&.selected {
|
|
162
146
|
border: 1px solid $component-border-color;
|
|
163
147
|
border-top: 1px solid $font-color-second;
|
|
@@ -183,9 +167,9 @@
|
|
|
183
167
|
justify-content: center;
|
|
184
168
|
}
|
|
185
169
|
> .menu > .menuitem {
|
|
186
|
-
border-radius: 0px 5px 5px 0px;
|
|
187
|
-
-moz-border-radius: 0px 5px 5px 0px;
|
|
188
|
-
-webkit-border-radius: 0px 5px 5px 0px;
|
|
170
|
+
border-radius: 0px 5px 5px 0px;
|
|
171
|
+
-moz-border-radius: 0px 5px 5px 0px;
|
|
172
|
+
-webkit-border-radius: 0px 5px 5px 0px;
|
|
189
173
|
&.selected {
|
|
190
174
|
border: 1px solid $component-border-color;
|
|
191
175
|
border-left: 1px solid $font-color-second;
|
|
@@ -198,22 +182,3 @@
|
|
|
198
182
|
border-right: 0;
|
|
199
183
|
}
|
|
200
184
|
}
|
|
201
|
-
|
|
202
|
-
/*
|
|
203
|
-
Dropdown hide tabs
|
|
204
|
-
*/
|
|
205
|
-
.dropdown-hide-tabs .menuitem {
|
|
206
|
-
cursor: pointer;
|
|
207
|
-
line-height: 20px;
|
|
208
|
-
margin-right: 1px;
|
|
209
|
-
display: flex;
|
|
210
|
-
align-items: center;
|
|
211
|
-
justify-content: space-between;
|
|
212
|
-
min-height: 50px;
|
|
213
|
-
> .closepanel {
|
|
214
|
-
@extend %tab-closepanel;
|
|
215
|
-
}
|
|
216
|
-
&:hover > .closepanel {
|
|
217
|
-
visibility: visible;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
@@ -42,25 +42,6 @@
|
|
|
42
42
|
animation: revealelement 0.3s forwards ease-in-out;
|
|
43
43
|
> .label {
|
|
44
44
|
width: auto;
|
|
45
|
-
display: flex;
|
|
46
|
-
justify-content: flex-start;
|
|
47
|
-
align-items: center;
|
|
48
|
-
>.node-menu {
|
|
49
|
-
animation: revealelement 0.3s forwards ease-in-out;
|
|
50
|
-
margin-left: 10px;
|
|
51
|
-
}
|
|
52
|
-
>.node-rightelements {
|
|
53
|
-
animation: revealelement 0.3s forwards ease-in-out;
|
|
54
|
-
display: flex;
|
|
55
|
-
justify-content: flex-start;
|
|
56
|
-
align-items: center;
|
|
57
|
-
}
|
|
58
|
-
>.node-toolbarelements {
|
|
59
|
-
animation: revealelement 0.3s forwards ease-in-out;
|
|
60
|
-
width: auto;
|
|
61
|
-
height: 100%;
|
|
62
|
-
margin-left: 10px;
|
|
63
|
-
}
|
|
64
45
|
&:hover {
|
|
65
46
|
background-color: rgb(209, 209, 209);
|
|
66
47
|
}
|
|
@@ -72,16 +53,3 @@
|
|
|
72
53
|
float: left;
|
|
73
54
|
}
|
|
74
55
|
}
|
|
75
|
-
|
|
76
|
-
.nodelist > .treeviewitem > .label > .node-rightelements > .element,
|
|
77
|
-
.treeview-component > .treeviewcontainer > .treeviewitem > .label > .node-rightelements > .element {
|
|
78
|
-
margin-left: 10px;
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
height: 100%;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.nodelist > .treeviewitem > .label > .node-toolbarelements > .toolbar-group > .buttonbar,
|
|
85
|
-
.treeview-component > .treeviewcontainer > .treeviewitem > .label > .node-toolbarelements > .toolbar-group > .buttonbar {
|
|
86
|
-
border: none;
|
|
87
|
-
}
|
|
@@ -103,29 +103,18 @@ describe('Avatar', function () {
|
|
|
103
103
|
expect(container.firstChild).toContainElement(_react2.screen.getByAltText('Avatar Teste'));
|
|
104
104
|
expect(_react2.screen.getByAltText('Avatar Teste')).toHaveClass('imgavatar');
|
|
105
105
|
});
|
|
106
|
-
it('should not render icon if has image', function () {
|
|
107
|
-
var mockAvatar = /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
108
|
-
src: "https://yt3.ggpht.com/a-/AAuE7mDGQh9L3n_EULfeZEO9rs_JR4BY376CSrlxdw=s900-mo-c-c0xffffffff-rj-k-no",
|
|
109
|
-
srcAlt: "Avatar Teste"
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
var _render9 = (0, _react2.render)(mockAvatar),
|
|
113
|
-
container = _render9.container;
|
|
114
|
-
|
|
115
|
-
expect(container.firstChild).not.toContainElement(document.querySelector('.icon-component'));
|
|
116
|
-
});
|
|
117
106
|
it('should change size', function () {
|
|
118
|
-
var
|
|
107
|
+
var _render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
119
108
|
label: "B",
|
|
120
109
|
width: "56px",
|
|
121
110
|
height: "56px"
|
|
122
111
|
})),
|
|
123
|
-
container =
|
|
112
|
+
container = _render9.container;
|
|
124
113
|
|
|
125
114
|
expect(container.firstChild).toHaveStyle('width: 56px; height:56px');
|
|
126
115
|
});
|
|
127
116
|
it('should open dropdown and render chilren', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
128
|
-
var mockAvatar,
|
|
117
|
+
var mockAvatar, _render10, container;
|
|
129
118
|
|
|
130
119
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
131
120
|
while (1) {
|
|
@@ -146,7 +135,7 @@ describe('Avatar', function () {
|
|
|
146
135
|
text: "Itemlist sem \xEDcone Disabled",
|
|
147
136
|
disabled: true
|
|
148
137
|
})));
|
|
149
|
-
|
|
138
|
+
_render10 = (0, _react2.render)(mockAvatar), container = _render10.container;
|
|
150
139
|
|
|
151
140
|
_react2.fireEvent.click(container.firstChild);
|
|
152
141
|
|
|
@@ -169,11 +158,11 @@ describe('Avatar', function () {
|
|
|
169
158
|
it('should callback function onClick', function () {
|
|
170
159
|
var mockOnClick = jest.fn();
|
|
171
160
|
|
|
172
|
-
var
|
|
161
|
+
var _render11 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
173
162
|
label: "B",
|
|
174
163
|
onClick: mockOnClick
|
|
175
164
|
})),
|
|
176
|
-
container =
|
|
165
|
+
container = _render11.container;
|
|
177
166
|
|
|
178
167
|
_react2.fireEvent.click(container.firstChild);
|
|
179
168
|
|
package/lib/avatar/index.js
CHANGED
|
@@ -85,7 +85,7 @@ var Avatar = function Avatar(props) {
|
|
|
85
85
|
backgroundColor: "".concat(color),
|
|
86
86
|
cursor: "".concat(dropdown ? 'pointer' : 'normal')
|
|
87
87
|
}, style)
|
|
88
|
-
}, (iconName || icon) &&
|
|
88
|
+
}, (iconName || icon) && getIcon(iconName, icon), src && /*#__PURE__*/_react["default"].createElement("img", {
|
|
89
89
|
className: "imgavatar",
|
|
90
90
|
style: {
|
|
91
91
|
width: "".concat(width),
|
|
@@ -69,8 +69,7 @@ var DefaultButton = function DefaultButton(props) {
|
|
|
69
69
|
boxShadow = props.boxShadow,
|
|
70
70
|
transparent = props.transparent,
|
|
71
71
|
round = props.round,
|
|
72
|
-
permissionAttr = props.permissionAttr
|
|
73
|
-
_onBlur = props.onBlur;
|
|
72
|
+
permissionAttr = props.permissionAttr;
|
|
74
73
|
|
|
75
74
|
var _useState = (0, _react.useState)(false),
|
|
76
75
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -148,9 +147,6 @@ var DefaultButton = function DefaultButton(props) {
|
|
|
148
147
|
if (dropdown) showDropdown();
|
|
149
148
|
if (_onClick && toggleable) setActiveButton(!activeButton);
|
|
150
149
|
},
|
|
151
|
-
onBlur: function onBlur(e) {
|
|
152
|
-
if (_onBlur) _onBlur(e);
|
|
153
|
-
},
|
|
154
150
|
disabled: shouldDisable(),
|
|
155
151
|
className: "".concat(getClass(), " ").concat(activeButton ? '-toggleable' : ''),
|
|
156
152
|
ref: function ref(r) {
|
|
@@ -180,7 +176,6 @@ DefaultButton.propTypes = {
|
|
|
180
176
|
boxShadow: _propTypes["default"].bool,
|
|
181
177
|
icon: _propTypes["default"].instanceOf(Object),
|
|
182
178
|
onClick: _propTypes["default"].func,
|
|
183
|
-
onBlur: _propTypes["default"].func,
|
|
184
179
|
targetRef: _propTypes["default"].func,
|
|
185
180
|
tabIndex: _propTypes["default"].string,
|
|
186
181
|
dropdown: _propTypes["default"].bool,
|
|
@@ -216,7 +211,6 @@ DefaultButton.defaultProps = {
|
|
|
216
211
|
icon: null,
|
|
217
212
|
content: null,
|
|
218
213
|
onClick: null,
|
|
219
|
-
onBlur: null,
|
|
220
214
|
targetRef: undefined,
|
|
221
215
|
tabIndex: undefined,
|
|
222
216
|
isLoading: false,
|
package/lib/checkbox/index.js
CHANGED
|
@@ -13,8 +13,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
13
13
|
|
|
14
14
|
var _gridlayout = _interopRequireDefault(require("../gridlayout"));
|
|
15
15
|
|
|
16
|
-
var _Label = _interopRequireDefault(require("./Label"));
|
|
17
|
-
|
|
18
16
|
require("../assets/styles/checkbox.scss");
|
|
19
17
|
|
|
20
18
|
var _permissionValidations = require("../permissionValidations");
|
|
@@ -54,10 +52,7 @@ var CheckBox = function CheckBox(props) {
|
|
|
54
52
|
id = props.id,
|
|
55
53
|
gridLayout = props.gridLayout,
|
|
56
54
|
checked = props.checked,
|
|
57
|
-
permissionAttr = props.permissionAttr
|
|
58
|
-
tooltip = props.tooltip,
|
|
59
|
-
tooltipPosition = props.tooltipPosition,
|
|
60
|
-
tooltipWidth = props.tooltipWidth;
|
|
55
|
+
permissionAttr = props.permissionAttr;
|
|
61
56
|
|
|
62
57
|
var _useState = (0, _react.useState)(checked),
|
|
63
58
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -127,12 +122,9 @@ var CheckBox = function CheckBox(props) {
|
|
|
127
122
|
value: value,
|
|
128
123
|
id: id,
|
|
129
124
|
onChange: function onChange() {}
|
|
130
|
-
}), /*#__PURE__*/_react["default"].createElement("span", null), label && /*#__PURE__*/_react["default"].createElement(
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
tooltipWidth: tooltipWidth,
|
|
134
|
-
tooltipPosition: tooltipPosition
|
|
135
|
-
})), hint && /*#__PURE__*/_react["default"].createElement("div", {
|
|
125
|
+
}), /*#__PURE__*/_react["default"].createElement("span", null), label && /*#__PURE__*/_react["default"].createElement("span", {
|
|
126
|
+
className: "checkbox-description"
|
|
127
|
+
}, label)), hint && /*#__PURE__*/_react["default"].createElement("div", {
|
|
136
128
|
className: "checkbox-hint"
|
|
137
129
|
}, hint));
|
|
138
130
|
};
|
|
@@ -157,10 +149,7 @@ CheckBox.propTypes = {
|
|
|
157
149
|
autofocus: _propTypes["default"].bool,
|
|
158
150
|
hint: _propTypes["default"].string,
|
|
159
151
|
gridLayout: _propTypes["default"].string,
|
|
160
|
-
permissionAttr: _propTypes["default"].oneOfType([_propTypes["default"].object, _propTypes["default"].arrayOf(_propTypes["default"].object)])
|
|
161
|
-
tooltip: _propTypes["default"].string,
|
|
162
|
-
tooltipPosition: _propTypes["default"].string,
|
|
163
|
-
tooltipWidth: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number])
|
|
152
|
+
permissionAttr: _propTypes["default"].oneOfType([_propTypes["default"].object, _propTypes["default"].arrayOf(_propTypes["default"].object)])
|
|
164
153
|
};
|
|
165
154
|
CheckBox.defaultProps = {
|
|
166
155
|
label: '',
|
|
@@ -175,10 +164,7 @@ CheckBox.defaultProps = {
|
|
|
175
164
|
hint: undefined,
|
|
176
165
|
id: undefined,
|
|
177
166
|
gridLayout: undefined,
|
|
178
|
-
permissionAttr: undefined
|
|
179
|
-
tooltip: '',
|
|
180
|
-
tooltipPosition: 'top',
|
|
181
|
-
tooltipWidth: 'auto'
|
|
167
|
+
permissionAttr: undefined
|
|
182
168
|
};
|
|
183
169
|
var _default = CheckBox;
|
|
184
170
|
exports["default"] = _default;
|