linear-react-components-ui 0.4.76-rc.9 → 0.4.77-beta.10
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/.husky/pre-commit +2 -2
- package/.tool-versions +1 -0
- package/.vscode/settings.json +1 -2
- package/README.md +40 -5
- package/lib/@types/LabelStyles.js +5 -0
- package/lib/@types/PermissionAttr.js +5 -0
- package/lib/@types/PointerEvents.js +5 -0
- package/lib/@types/Position.js +5 -0
- package/lib/@types/Size.js +5 -0
- package/lib/@types/SizePixels.js +5 -0
- package/lib/alerts/AlertProvider.js +1 -1
- package/lib/alerts/BaseAlert.js +1 -1
- package/lib/assets/styles/button.scss +19 -10
- package/lib/assets/styles/checkbox.scss +92 -70
- package/lib/assets/styles/commons.scss +36 -0
- package/lib/assets/styles/drawers.scss +22 -6
- package/lib/assets/styles/dropdown.scss +28 -2
- package/lib/assets/styles/effects.scss +32 -0
- package/lib/assets/styles/floatMenu.scss +0 -1
- package/lib/assets/styles/gridlayout.scss +2 -1
- package/lib/assets/styles/input.scss +21 -0
- package/lib/assets/styles/label.scss +9 -1
- package/lib/assets/styles/list.scss +8 -0
- package/lib/assets/styles/multiSelect.scss +105 -0
- package/lib/assets/styles/panel.scss +3 -1
- package/lib/assets/styles/periodpicker.scss +65 -0
- package/lib/assets/styles/progress.scss +8 -1
- package/lib/assets/styles/radio.scss +19 -0
- package/lib/assets/styles/select.scss +4 -3
- package/lib/assets/styles/sidenav.scss +103 -42
- package/lib/assets/styles/skeleton.scss +48 -0
- package/lib/assets/styles/table.scss +25 -5
- package/lib/assets/styles/tabs.scss +116 -75
- package/lib/assets/styles/treeview.scss +41 -0
- package/lib/assets/styles/uitour.scss +112 -0
- package/lib/avatar/avatar.spec.js +17 -6
- package/lib/avatar/index.js +1 -1
- package/lib/buttons/DefaultButton.js +14 -5
- package/lib/buttons/index.js +28 -28
- package/lib/buttons/split_button/index.js +8 -4
- package/lib/buttons/types.js +5 -0
- package/lib/calendar/base/helpers.js +6 -6
- package/lib/calendar/base/index.js +1 -1
- package/lib/calendar/index.js +10 -10
- package/lib/checkbox/Label.js +37 -0
- package/lib/checkbox/checkbox.spec.js +16 -16
- package/lib/checkbox/index.js +34 -13
- package/lib/checkbox/types.js +5 -0
- package/lib/dialog/base/index.js +15 -6
- package/lib/dialog/form/index.js +24 -4
- package/lib/dialog/index.js +6 -6
- package/lib/drawer/Drawer.js +10 -6
- package/lib/drawer/Header.js +15 -5
- package/lib/drawer/index.js +8 -5
- package/lib/dropdown/Popup.js +3 -2
- package/lib/dropdown/types.js +5 -0
- package/lib/dropdown/withDropdown.js +2 -2
- package/lib/fieldset/index.js +1 -1
- package/lib/form/Field.js +3 -1
- package/lib/form/FieldNumber.js +11 -3
- package/lib/form/FieldPeriod.js +100 -0
- package/lib/form/form.spec.js +8 -0
- package/lib/form/helpers.js +20 -1
- package/lib/form/index.js +224 -222
- package/lib/form/withFieldHOC.js +6 -2
- package/lib/form/withFormSecurity.js +106 -0
- package/lib/icons/helper.js +24 -0
- package/lib/icons/types.js +5 -0
- package/lib/index.js +12 -12
- package/lib/inputs/base/InputTextBase.js +31 -6
- package/lib/inputs/base/helpers.js +14 -10
- package/lib/inputs/color/index.js +1 -1
- package/lib/inputs/date/Dropdown.js +4 -4
- package/lib/inputs/date/date.spec.js +46 -36
- package/lib/inputs/date/helpers.js +36 -0
- package/lib/inputs/date/index.js +13 -11
- package/lib/inputs/inputHOC.js +1 -1
- package/lib/inputs/mask/Cnpj.js +1 -1
- package/lib/inputs/mask/Cpf.js +1 -1
- package/lib/inputs/mask/Phone.js +10 -1
- package/lib/inputs/mask/helpers.js +2 -2
- package/lib/inputs/mask/imaskHOC.js +3 -2
- package/lib/inputs/mask/index.js +4 -4
- package/lib/inputs/mask/input_mask.spec.js +21 -4
- package/lib/inputs/multiSelect/ActionButtons.js +68 -0
- package/lib/inputs/multiSelect/Dropdown.js +200 -0
- package/lib/inputs/multiSelect/helper.js +18 -0
- package/lib/inputs/multiSelect/index.js +343 -0
- package/lib/inputs/number/BaseNumber.js +1 -1
- package/lib/inputs/number/format_number.js +1 -1
- package/lib/inputs/number/index.js +7 -5
- package/lib/inputs/period/Dialog.js +38 -0
- package/lib/inputs/period/Dropdown.js +90 -0
- package/lib/inputs/period/PeriodList.js +79 -0
- package/lib/inputs/period/helper.js +118 -0
- package/lib/inputs/period/index.js +490 -0
- package/lib/inputs/search/index.js +3 -1
- package/lib/inputs/select/Dropdown.js +56 -66
- package/lib/inputs/select/helper.js +65 -2
- package/lib/inputs/select/index.js +26 -3
- package/lib/inputs/select/multiple/index.js +17 -12
- package/lib/inputs/select/simple/index.js +40 -25
- package/lib/internals/constants.js +5 -4
- package/lib/internals/types.js +5 -0
- package/lib/internals/withTooltip.js +87 -83
- package/lib/labelMessages/index.js +1 -1
- package/lib/labelMessages/types.js +5 -0
- package/lib/labels/DefaultLabel.js +8 -5
- package/lib/labels/index.js +10 -10
- package/lib/list/Item.js +36 -10
- package/lib/list/helpers.js +8 -3
- package/lib/list/index.js +173 -15
- package/lib/list/list.spec.js +290 -89
- package/lib/menus/float/MenuItem.js +25 -8
- package/lib/menus/sidenav/NavMenuItem.js +18 -9
- package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
- package/lib/menus/sidenav/helpers.js +1 -1
- package/lib/menus/sidenav/index.js +69 -96
- package/lib/menus/sidenav/popup_menu_search/index.js +29 -18
- package/lib/menus/sidenav/sidenav.spec.js +86 -19
- package/lib/panel/Default.js +1 -1
- package/lib/panel/Header.js +4 -3
- package/lib/panel/helpers.js +1 -1
- package/lib/panel/index.js +14 -14
- package/lib/permissionValidations.js +1 -1
- package/lib/progress/Bar.js +40 -9
- package/lib/progress/index.js +12 -4
- package/lib/radio/index.js +10 -7
- package/lib/radio/types.js +5 -0
- package/lib/skeleton/SkeletonContainer.js +42 -0
- package/lib/skeleton/index.js +84 -0
- package/lib/spinner/index.js +7 -2
- package/lib/split/Split.js +6 -12
- package/lib/table/Body.js +55 -11
- package/lib/table/Header.js +14 -1
- package/lib/table/HeaderColumn.js +26 -3
- package/lib/table/Row.js +19 -8
- package/lib/table/RowColumn.js +23 -3
- package/lib/table/helpers.js +11 -1
- package/lib/table/index.js +50 -17
- package/lib/tabs/DropdownItems.js +84 -0
- package/lib/tabs/Menu.js +12 -9
- package/lib/tabs/MenuItems.js +15 -9
- package/lib/tabs/Panel.js +2 -4
- package/lib/tabs/index.js +157 -23
- package/lib/tabs/tabHelpers.js +3 -2
- package/lib/tabs/tabs.spec.js +8 -5
- package/lib/toolbar/ButtonBar.js +30 -24
- package/lib/toolbar/LabelBar.js +22 -27
- package/lib/toolbar/helpers.js +12 -0
- package/lib/toolbar/index.js +32 -17
- package/lib/tooltip/index.js +20 -7
- package/lib/treeview/Node.js +365 -50
- package/lib/treeview/index.js +476 -37
- package/lib/treeview/treeview.spec.js +18 -0
- package/lib/treeview_old/Node.js +1 -1
- package/lib/uitour/helpers.js +15 -0
- package/lib/uitour/index.js +271 -0
- package/lib/uitour/uitour.spec.js +176 -0
- package/package.json +10 -8
- package/lib/inputs/date/helper.js +0 -16
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
@import "colors.scss";
|
|
2
2
|
@import "effects.scss";
|
|
3
|
+
@import "commons.scss";
|
|
4
|
+
|
|
3
5
|
.table-component {
|
|
4
6
|
width: 100%;
|
|
5
7
|
max-width: 100%;
|
|
@@ -8,7 +10,8 @@
|
|
|
8
10
|
font-size: 14px;
|
|
9
11
|
max-height: 20em;
|
|
10
12
|
position: relative;
|
|
11
|
-
> .headercontainer,
|
|
13
|
+
> .headercontainer,
|
|
14
|
+
.bodycontainer {
|
|
12
15
|
width: 100%;
|
|
13
16
|
.innertable {
|
|
14
17
|
width: 100%;
|
|
@@ -17,6 +20,13 @@
|
|
|
17
20
|
> .bodycontainer {
|
|
18
21
|
overflow-y: auto;
|
|
19
22
|
}
|
|
23
|
+
> .bodycontainer > .innertable > .tbody,
|
|
24
|
+
> .tbody {
|
|
25
|
+
position: relative;
|
|
26
|
+
&.skeleton-transparency::before {
|
|
27
|
+
@extend %skeleton-transparency;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
20
30
|
> .headercontainer > .innertable > .theader > .trow,
|
|
21
31
|
> .bodycontainer > .innertable > .tbody > .trow,
|
|
22
32
|
> .theader > .trow,
|
|
@@ -31,7 +41,11 @@
|
|
|
31
41
|
vertical-align: middle;
|
|
32
42
|
border-bottom: 1px solid $component-border-color-soft;
|
|
33
43
|
line-height: 18px;
|
|
34
|
-
> .
|
|
44
|
+
> .rowskeleton {
|
|
45
|
+
margin: 10px 0;
|
|
46
|
+
}
|
|
47
|
+
> .hidden,
|
|
48
|
+
> .rowhover {
|
|
35
49
|
display: none;
|
|
36
50
|
animation: revealelement 0.2s forwards ease-in-out;
|
|
37
51
|
}
|
|
@@ -39,7 +53,7 @@
|
|
|
39
53
|
border-bottom: 0;
|
|
40
54
|
}
|
|
41
55
|
}
|
|
42
|
-
|
|
56
|
+
|
|
43
57
|
> .bodycontainer > .innertable > .tbody > .trow,
|
|
44
58
|
> .tbody > .trow {
|
|
45
59
|
&.-selected {
|
|
@@ -48,7 +62,7 @@
|
|
|
48
62
|
}
|
|
49
63
|
&:hover {
|
|
50
64
|
> .rowcolumn > .rowhover {
|
|
51
|
-
display: table
|
|
65
|
+
display: table;
|
|
52
66
|
}
|
|
53
67
|
}
|
|
54
68
|
}
|
|
@@ -84,7 +98,7 @@
|
|
|
84
98
|
background: $header-container-bg;
|
|
85
99
|
}
|
|
86
100
|
> .headercontainer > .innertable > .theader,
|
|
87
|
-
> .theader {
|
|
101
|
+
> .theader {
|
|
88
102
|
background: $header-container-bg;
|
|
89
103
|
}
|
|
90
104
|
}
|
|
@@ -115,3 +129,9 @@
|
|
|
115
129
|
}
|
|
116
130
|
}
|
|
117
131
|
}
|
|
132
|
+
|
|
133
|
+
.table-component.-skeletonized {
|
|
134
|
+
> .bodycontainer {
|
|
135
|
+
overflow: hidden;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
@@ -1,4 +1,29 @@
|
|
|
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
|
+
}
|
|
2
27
|
%tab-component-menus {
|
|
3
28
|
.menu {
|
|
4
29
|
-webkit-box-shadow: 0px -1px 0px $component-border-color inset;
|
|
@@ -7,22 +32,25 @@
|
|
|
7
32
|
display: flex;
|
|
8
33
|
flex-wrap: nowrap;
|
|
9
34
|
justify-content: center;
|
|
10
|
-
flex
|
|
35
|
+
flex: 1;
|
|
11
36
|
&.-firsttabident > .menuitem:first-child {
|
|
12
37
|
margin-left: 15px;
|
|
13
38
|
}
|
|
14
39
|
}
|
|
15
|
-
.menu
|
|
40
|
+
.menu > .menuitem {
|
|
16
41
|
border-bottom: 0;
|
|
17
|
-
border-radius: 5px 5px 0px 0px;
|
|
18
|
-
-moz-border-radius: 5px 5px 0px 0px;
|
|
19
|
-
-webkit-border-radius: 5px 5px 0px 0px;
|
|
42
|
+
border-radius: 5px 5px 0px 0px;
|
|
43
|
+
-moz-border-radius: 5px 5px 0px 0px;
|
|
44
|
+
-webkit-border-radius: 5px 5px 0px 0px;
|
|
20
45
|
text-shadow: 0 1px $font-color-second;
|
|
21
46
|
cursor: pointer;
|
|
22
47
|
line-height: 20px;
|
|
23
48
|
margin-right: 1px;
|
|
24
49
|
padding: 0;
|
|
25
50
|
width: auto;
|
|
51
|
+
display: flex;
|
|
52
|
+
justify-content: space-between;
|
|
53
|
+
align-items: center;
|
|
26
54
|
&.selected {
|
|
27
55
|
border: 1px solid $component-border-color;
|
|
28
56
|
background: $font-color-second;
|
|
@@ -31,40 +59,22 @@
|
|
|
31
59
|
box-shadow: 0;
|
|
32
60
|
font-weight: bold; /* z-index: 2; */
|
|
33
61
|
}
|
|
34
|
-
&.selected > .closepanel,
|
|
62
|
+
&.selected > .closepanel,
|
|
63
|
+
&:hover > .closepanel {
|
|
35
64
|
visibility: visible;
|
|
36
65
|
}
|
|
37
66
|
}
|
|
38
|
-
.menu
|
|
67
|
+
.menu > .menuitem > .menubutton {
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
text-overflow: ellipsis;
|
|
39
70
|
background: transparent;
|
|
40
71
|
border: 0;
|
|
41
72
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
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
|
-
}
|
|
73
|
+
|
|
74
|
+
.menu > .menuitem > .closepanel {
|
|
75
|
+
@extend %tab-closepanel;
|
|
67
76
|
}
|
|
77
|
+
|
|
68
78
|
.menubar {
|
|
69
79
|
width: auto;
|
|
70
80
|
border-bottom: 1px solid #dae1e8;
|
|
@@ -85,7 +95,13 @@
|
|
|
85
95
|
display: flex;
|
|
86
96
|
flex-wrap: nowrap;
|
|
87
97
|
width: 100%;
|
|
98
|
+
min-height: 35px;
|
|
99
|
+
overflow: hidden;
|
|
88
100
|
@extend %tab-component-menus;
|
|
101
|
+
> .dropdownbutton {
|
|
102
|
+
border-bottom: 1px solid $component-border-color;
|
|
103
|
+
padding: 0 0.8rem;
|
|
104
|
+
}
|
|
89
105
|
}
|
|
90
106
|
> .panel {
|
|
91
107
|
background-color: $font-color-second;
|
|
@@ -105,24 +121,26 @@
|
|
|
105
121
|
.tabs-component.menu-left {
|
|
106
122
|
grid-template-columns: auto 1fr;
|
|
107
123
|
grid-template-rows: none;
|
|
108
|
-
> .
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
> .menucontainer {
|
|
125
|
+
> .menu {
|
|
126
|
+
box-shadow: -1px 0px 0px 0px $component-border-color inset;
|
|
127
|
+
flex-direction: column;
|
|
128
|
+
justify-content: center;
|
|
129
|
+
}
|
|
130
|
+
> .menu > .menuitem {
|
|
131
|
+
border-radius: 5px 0px 0px 5px;
|
|
132
|
+
-moz-border-radius: 5px 0px 0px 5px;
|
|
133
|
+
-webkit-border-radius: 5px 0px 0px 5px;
|
|
134
|
+
&.selected {
|
|
135
|
+
border: 1px solid $component-border-color;
|
|
136
|
+
border-right: 1px solid $font-color-second;
|
|
137
|
+
border-left: 2px solid $component-selected-color;
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
> .menu > .menuitem > .closepanel {
|
|
142
|
+
float: left;
|
|
122
143
|
}
|
|
123
|
-
}
|
|
124
|
-
> .menu > .menuitem > .closepanel {
|
|
125
|
-
float: left
|
|
126
144
|
}
|
|
127
145
|
> .panel {
|
|
128
146
|
border-top: 1px solid $component-border-color;
|
|
@@ -135,18 +153,20 @@
|
|
|
135
153
|
*/
|
|
136
154
|
.tabs-component.menu-bottom {
|
|
137
155
|
grid-template-rows: 1fr auto;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
156
|
+
.menucontainer {
|
|
157
|
+
> .menu {
|
|
158
|
+
box-shadow: 0 1px 1px 0px $component-border-color inset;
|
|
159
|
+
}
|
|
160
|
+
> .menu > .menuitem {
|
|
161
|
+
border-radius: 0px 0px 5px 5px;
|
|
162
|
+
-moz-border-radius: 0px 0px 5px 5px;
|
|
163
|
+
-webkit-border-radius: 0px 0px 5px 5px;
|
|
164
|
+
&.selected {
|
|
165
|
+
border: 1px solid $component-border-color;
|
|
166
|
+
border-top: 1px solid $font-color-second;
|
|
167
|
+
border-bottom: 2px solid $component-selected-color;
|
|
168
|
+
height: 100%;
|
|
169
|
+
}
|
|
150
170
|
}
|
|
151
171
|
}
|
|
152
172
|
> .panel {
|
|
@@ -161,20 +181,22 @@
|
|
|
161
181
|
.tabs-component.menu-right {
|
|
162
182
|
grid-template-columns: 1fr auto;
|
|
163
183
|
grid-template-rows: none;
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
184
|
+
.menucontainer{
|
|
185
|
+
> .menu {
|
|
186
|
+
box-shadow: 2px 0 0px -1px $component-border-color inset;
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
}
|
|
190
|
+
> .menu > .menuitem {
|
|
191
|
+
border-radius: 0px 5px 5px 0px;
|
|
192
|
+
-moz-border-radius: 0px 5px 5px 0px;
|
|
193
|
+
-webkit-border-radius: 0px 5px 5px 0px;
|
|
194
|
+
&.selected {
|
|
195
|
+
border: 1px solid $component-border-color;
|
|
196
|
+
border-left: 1px solid $font-color-second;
|
|
197
|
+
border-right: 2px solid $component-selected-color;
|
|
198
|
+
width: 100%;
|
|
199
|
+
}
|
|
178
200
|
}
|
|
179
201
|
}
|
|
180
202
|
> .panel {
|
|
@@ -182,3 +204,22 @@
|
|
|
182
204
|
border-right: 0;
|
|
183
205
|
}
|
|
184
206
|
}
|
|
207
|
+
|
|
208
|
+
/*
|
|
209
|
+
Dropdown hide tabs
|
|
210
|
+
*/
|
|
211
|
+
.dropdown-hide-tabs .menuitem {
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
line-height: 20px;
|
|
214
|
+
margin-right: 1px;
|
|
215
|
+
display: flex;
|
|
216
|
+
align-items: center;
|
|
217
|
+
justify-content: space-between;
|
|
218
|
+
min-height: 50px;
|
|
219
|
+
> .closepanel {
|
|
220
|
+
@extend %tab-closepanel;
|
|
221
|
+
}
|
|
222
|
+
&:hover > .closepanel {
|
|
223
|
+
visibility: visible;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
margin-left: -20px;
|
|
16
16
|
cursor: pointer;
|
|
17
17
|
}
|
|
18
|
+
.loading {
|
|
19
|
+
margin-left: -30px;
|
|
20
|
+
position: absolute;
|
|
21
|
+
margin-top: -5px;
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
25
|
|
|
@@ -42,8 +47,31 @@
|
|
|
42
47
|
animation: revealelement 0.3s forwards ease-in-out;
|
|
43
48
|
> .label {
|
|
44
49
|
width: auto;
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: flex-start;
|
|
52
|
+
align-items: center;
|
|
53
|
+
min-height: 25px;
|
|
54
|
+
color: $font-color-soft;
|
|
55
|
+
>.node-menu {
|
|
56
|
+
animation: revealelement 0.3s forwards ease-in-out;
|
|
57
|
+
margin-left: 10px;
|
|
58
|
+
}
|
|
59
|
+
>.node-rightelements {
|
|
60
|
+
animation: revealelement 0.3s forwards ease-in-out;
|
|
61
|
+
display: flex;
|
|
62
|
+
justify-content: flex-start;
|
|
63
|
+
align-items: center;
|
|
64
|
+
}
|
|
65
|
+
>.node-toolbarelements {
|
|
66
|
+
animation: revealelement 0.3s forwards ease-in-out;
|
|
67
|
+
width: auto;
|
|
68
|
+
height: 100%;
|
|
69
|
+
margin-left: 10px;
|
|
70
|
+
}
|
|
45
71
|
&:hover {
|
|
72
|
+
cursor: pointer;
|
|
46
73
|
background-color: rgb(209, 209, 209);
|
|
74
|
+
text-decoration: underline;
|
|
47
75
|
}
|
|
48
76
|
}
|
|
49
77
|
> .nodelist {
|
|
@@ -53,3 +81,16 @@
|
|
|
53
81
|
float: left;
|
|
54
82
|
}
|
|
55
83
|
}
|
|
84
|
+
|
|
85
|
+
.nodelist > .treeviewitem > .label > .node-rightelements > .element,
|
|
86
|
+
.treeview-component > .treeviewcontainer > .treeviewitem > .label > .node-rightelements > .element {
|
|
87
|
+
margin-left: 10px;
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
height: 100%;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.nodelist > .treeviewitem > .label > .node-toolbarelements > .toolbar-group > .buttonbar,
|
|
94
|
+
.treeview-component > .treeviewcontainer > .treeviewitem > .label > .node-toolbarelements > .toolbar-group > .buttonbar {
|
|
95
|
+
border: none;
|
|
96
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
@import "commons.scss";
|
|
2
|
+
@import "colors.scss";
|
|
3
|
+
@import "effects.scss";
|
|
4
|
+
|
|
5
|
+
$step-arrow-size: 22px;
|
|
6
|
+
$step-arrow-shadow-size: 26px;
|
|
7
|
+
%step-arrow {
|
|
8
|
+
content: '';
|
|
9
|
+
position: absolute;
|
|
10
|
+
border-bottom: $step-arrow-size solid transparent;
|
|
11
|
+
border-right: $step-arrow-size solid #fff;
|
|
12
|
+
border-top: $step-arrow-size solid transparent;
|
|
13
|
+
}
|
|
14
|
+
%step-arrow-shadow {
|
|
15
|
+
content: '';
|
|
16
|
+
position: absolute;
|
|
17
|
+
border-bottom: $step-arrow-shadow-size solid transparent;
|
|
18
|
+
border-right: $step-arrow-shadow-size solid rgba(0, 0, 0, 0.6);
|
|
19
|
+
border-top: $step-arrow-shadow-size solid transparent;
|
|
20
|
+
}
|
|
21
|
+
.uitour-component {
|
|
22
|
+
position: absolute;
|
|
23
|
+
width: 100%;
|
|
24
|
+
height: 100vh;
|
|
25
|
+
left: 0;
|
|
26
|
+
top: 0;
|
|
27
|
+
z-index: 99999999999999999999;
|
|
28
|
+
> .step {
|
|
29
|
+
background-color: #fff;
|
|
30
|
+
position: relative;
|
|
31
|
+
max-width: 450px;
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
border: 3px solid rgba(0, 0, 0, 0.6);
|
|
35
|
+
border-radius: 8px;
|
|
36
|
+
padding: 5px 0;
|
|
37
|
+
&.-left {
|
|
38
|
+
animation: slideRightToLeftWithFade 0.5s;
|
|
39
|
+
&:before {
|
|
40
|
+
@extend %step-arrow-shadow;
|
|
41
|
+
top: 6px;
|
|
42
|
+
left: -$step-arrow-shadow-size;
|
|
43
|
+
}
|
|
44
|
+
&:after {
|
|
45
|
+
@extend %step-arrow;
|
|
46
|
+
top: 10px;
|
|
47
|
+
left: -$step-arrow-size;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
&.-right {
|
|
51
|
+
animation: slideLeftToRightWithFade 0.5s;
|
|
52
|
+
&:before {
|
|
53
|
+
@extend %step-arrow-shadow;
|
|
54
|
+
top: 6px;
|
|
55
|
+
right: -$step-arrow-shadow-size;
|
|
56
|
+
transform: rotate(180deg);
|
|
57
|
+
}
|
|
58
|
+
&:after {
|
|
59
|
+
@extend %step-arrow;
|
|
60
|
+
top: 10px;
|
|
61
|
+
right: -$step-arrow-size;
|
|
62
|
+
transform: rotate(180deg);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
> .closebutton {
|
|
66
|
+
align-self: flex-end;
|
|
67
|
+
padding: 0 5px 5px;
|
|
68
|
+
line-height: 0;
|
|
69
|
+
}
|
|
70
|
+
> .content {
|
|
71
|
+
width: 100%;
|
|
72
|
+
padding: 0px 20px;
|
|
73
|
+
margin-bottom: 0;
|
|
74
|
+
display: flex;
|
|
75
|
+
> .number {
|
|
76
|
+
display: flex;
|
|
77
|
+
width: 40px;
|
|
78
|
+
height: 40px;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
border-radius: 50%;
|
|
82
|
+
background-color: $success-color;
|
|
83
|
+
color: #fff;
|
|
84
|
+
margin-right: 10px;
|
|
85
|
+
font-weight: bold;
|
|
86
|
+
font-size: 20px;
|
|
87
|
+
line-height: 0;
|
|
88
|
+
}
|
|
89
|
+
> .about {
|
|
90
|
+
flex: 1;
|
|
91
|
+
margin-bottom: 10px;
|
|
92
|
+
> h3 {
|
|
93
|
+
font-size: 16px;
|
|
94
|
+
font-weight: bold;
|
|
95
|
+
}
|
|
96
|
+
> .description {
|
|
97
|
+
font-size: 14px;
|
|
98
|
+
line-height: 18px;
|
|
99
|
+
strong {
|
|
100
|
+
font-weight: bold;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
> .footer {
|
|
106
|
+
display: flex;
|
|
107
|
+
justify-content: flex-end;
|
|
108
|
+
gap: 10px;
|
|
109
|
+
padding: 5px 10px 10px;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -103,18 +103,29 @@ 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
|
+
});
|
|
106
117
|
it('should change size', function () {
|
|
107
|
-
var
|
|
118
|
+
var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
108
119
|
label: "B",
|
|
109
120
|
width: "56px",
|
|
110
121
|
height: "56px"
|
|
111
122
|
})),
|
|
112
|
-
container =
|
|
123
|
+
container = _render10.container;
|
|
113
124
|
|
|
114
125
|
expect(container.firstChild).toHaveStyle('width: 56px; height:56px');
|
|
115
126
|
});
|
|
116
127
|
it('should open dropdown and render chilren', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
117
|
-
var mockAvatar,
|
|
128
|
+
var mockAvatar, _render11, container;
|
|
118
129
|
|
|
119
130
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
120
131
|
while (1) {
|
|
@@ -135,7 +146,7 @@ describe('Avatar', function () {
|
|
|
135
146
|
text: "Itemlist sem \xEDcone Disabled",
|
|
136
147
|
disabled: true
|
|
137
148
|
})));
|
|
138
|
-
|
|
149
|
+
_render11 = (0, _react2.render)(mockAvatar), container = _render11.container;
|
|
139
150
|
|
|
140
151
|
_react2.fireEvent.click(container.firstChild);
|
|
141
152
|
|
|
@@ -158,11 +169,11 @@ describe('Avatar', function () {
|
|
|
158
169
|
it('should callback function onClick', function () {
|
|
159
170
|
var mockOnClick = jest.fn();
|
|
160
171
|
|
|
161
|
-
var
|
|
172
|
+
var _render12 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
162
173
|
label: "B",
|
|
163
174
|
onClick: mockOnClick
|
|
164
175
|
})),
|
|
165
|
-
container =
|
|
176
|
+
container = _render12.container;
|
|
166
177
|
|
|
167
178
|
_react2.fireEvent.click(container.firstChild);
|
|
168
179
|
|
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) && getIcon(iconName, icon), src && /*#__PURE__*/_react["default"].createElement("img", {
|
|
88
|
+
}, (iconName || icon) && !src && getIcon(iconName, icon), src && /*#__PURE__*/_react["default"].createElement("img", {
|
|
89
89
|
className: "imgavatar",
|
|
90
90
|
style: {
|
|
91
91
|
width: "".concat(width),
|
|
@@ -37,7 +37,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
37
37
|
|
|
38
38
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
39
39
|
|
|
40
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr
|
|
40
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
41
41
|
|
|
42
42
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
43
43
|
|
|
@@ -69,7 +69,9 @@ var DefaultButton = function DefaultButton(props) {
|
|
|
69
69
|
boxShadow = props.boxShadow,
|
|
70
70
|
transparent = props.transparent,
|
|
71
71
|
round = props.round,
|
|
72
|
-
permissionAttr = props.permissionAttr
|
|
72
|
+
permissionAttr = props.permissionAttr,
|
|
73
|
+
_onBlur = props.onBlur,
|
|
74
|
+
skeletonize = props.skeletonize;
|
|
73
75
|
|
|
74
76
|
var _useState = (0, _react.useState)(false),
|
|
75
77
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -147,8 +149,11 @@ var DefaultButton = function DefaultButton(props) {
|
|
|
147
149
|
if (dropdown) showDropdown();
|
|
148
150
|
if (_onClick && toggleable) setActiveButton(!activeButton);
|
|
149
151
|
},
|
|
152
|
+
onBlur: function onBlur(e) {
|
|
153
|
+
if (_onBlur) _onBlur(e);
|
|
154
|
+
},
|
|
150
155
|
disabled: shouldDisable(),
|
|
151
|
-
className: "".concat(getClass(), " ").concat(activeButton ? '-toggleable' : ''),
|
|
156
|
+
className: "".concat(getClass(), " ").concat(activeButton ? '-toggleable' : '', " ").concat(skeletonize ? '-skeletonized' : ''),
|
|
152
157
|
ref: function ref(r) {
|
|
153
158
|
if (targetRef) targetRef(r);
|
|
154
159
|
setButtonRef(r);
|
|
@@ -176,6 +181,7 @@ DefaultButton.propTypes = {
|
|
|
176
181
|
boxShadow: _propTypes["default"].bool,
|
|
177
182
|
icon: _propTypes["default"].instanceOf(Object),
|
|
178
183
|
onClick: _propTypes["default"].func,
|
|
184
|
+
onBlur: _propTypes["default"].func,
|
|
179
185
|
targetRef: _propTypes["default"].func,
|
|
180
186
|
tabIndex: _propTypes["default"].string,
|
|
181
187
|
dropdown: _propTypes["default"].bool,
|
|
@@ -191,7 +197,8 @@ DefaultButton.propTypes = {
|
|
|
191
197
|
id: _propTypes["default"].string,
|
|
192
198
|
permissionAttr: _propTypes["default"].oneOfType([_propTypes["default"].object, _propTypes["default"].arrayOf(_propTypes["default"].object)]),
|
|
193
199
|
className: _propTypes["default"].string,
|
|
194
|
-
transparent: _propTypes["default"].bool
|
|
200
|
+
transparent: _propTypes["default"].bool,
|
|
201
|
+
skeletonize: _propTypes["default"].bool
|
|
195
202
|
};
|
|
196
203
|
DefaultButton.defaultProps = {
|
|
197
204
|
label: '',
|
|
@@ -211,6 +218,7 @@ DefaultButton.defaultProps = {
|
|
|
211
218
|
icon: null,
|
|
212
219
|
content: null,
|
|
213
220
|
onClick: null,
|
|
221
|
+
onBlur: null,
|
|
214
222
|
targetRef: undefined,
|
|
215
223
|
tabIndex: undefined,
|
|
216
224
|
isLoading: false,
|
|
@@ -222,7 +230,8 @@ DefaultButton.defaultProps = {
|
|
|
222
230
|
id: undefined,
|
|
223
231
|
permissionAttr: undefined,
|
|
224
232
|
className: undefined,
|
|
225
|
-
transparent: false
|
|
233
|
+
transparent: false,
|
|
234
|
+
skeletonize: false
|
|
226
235
|
};
|
|
227
236
|
|
|
228
237
|
var _default = (0, _withDropdown["default"])((0, _withTooltip["default"])(DefaultButton));
|