@rio-cloud/rio-uikit 0.16.1-beta-6 → 0.16.1-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.
Files changed (48) hide show
  1. package/lib/components/applicationHeader/ApplicationHeader.js +9 -7
  2. package/lib/components/applicationHeader/NavItems.js +8 -8
  3. package/lib/components/applicationLayout/ApplicationLayout.js +5 -8
  4. package/lib/components/applicationLayout/ApplicationLayoutBody.js +1 -3
  5. package/lib/components/applicationLayout/ApplicationLayoutSidebar.js +1 -2
  6. package/lib/components/applicationLayout/SubNavigation.js +60 -0
  7. package/lib/components/assetTree/Tree.js +151 -35
  8. package/lib/components/assetTree/TreeSelectAll.js +1 -1
  9. package/lib/components/assetTree/TreeSummary.js +11 -6
  10. package/lib/components/assetTree/TypeCounter.js +47 -8
  11. package/lib/components/charts/AreaChart.js +5 -3
  12. package/lib/components/charts/BarChart.js +5 -3
  13. package/lib/components/charts/ChartTooltip.js +14 -0
  14. package/lib/components/charts/LineChart.js +4 -2
  15. package/lib/components/charts/PieChart.js +5 -3
  16. package/lib/components/charts/RadialBarChart.js +4 -4
  17. package/lib/components/navigation/AppNavigationBar.js +64 -0
  18. package/lib/components/sidebars/Sidebar.js +16 -68
  19. package/lib/es/AppNavigationBar.d.ts +5 -0
  20. package/lib/es/AppNavigationBar.js +15 -0
  21. package/lib/es/ChartTooltip.d.ts +5 -0
  22. package/lib/es/ChartTooltip.js +15 -0
  23. package/lib/es/DeviceUtils.d.ts +6 -0
  24. package/lib/es/SubNavigation.d.ts +5 -0
  25. package/lib/es/SubNavigation.js +15 -0
  26. package/lib/es/deviceUtils.js +36 -0
  27. package/lib/es/useResizeObserver.d.ts +4 -0
  28. package/lib/es/useResizeObserver.js +15 -0
  29. package/lib/hooks/useClickOutside.js +2 -1
  30. package/lib/hooks/useResizeObserver.js +54 -0
  31. package/lib/hooks/useWindowResize.js +8 -5
  32. package/lib/style/css/_exports/rio-website.less +58 -6
  33. package/lib/style/css/_exports/vw-uikit.less +1 -1
  34. package/lib/style/css/animations/_imports.less +1 -0
  35. package/lib/style/css/animations/pulsing.less +5 -0
  36. package/lib/style/css/components/ApplicationHeader.less +244 -245
  37. package/lib/style/css/components/ApplicationLayout.less +10 -6
  38. package/lib/style/css/components/AssetTree.less +0 -4
  39. package/lib/style/css/design/buttons.less +4 -1
  40. package/lib/style/css/design/rioglyph.less +1 -12
  41. package/lib/style/fonts/rioglyph/rioglyph.less +56 -1
  42. package/lib/style/fonts/rioglyph/rioglyph.svg +68 -2
  43. package/lib/style/fonts/rioglyph/rioglyph.ttf +0 -0
  44. package/lib/style/fonts/rioglyph/rioglyph.woff +0 -0
  45. package/lib/types.ts +34 -10
  46. package/lib/utils/deviceUtils.js +19 -2
  47. package/lib/version.json +1 -1
  48. package/package.json +5 -3
@@ -1,14 +1,6 @@
1
- .ApplicationHeader .SubmoduleNavigation .submodule,
2
- .navbar .SubmoduleNavigation .submodule {
3
- white-space: nowrap;
4
- }
5
-
6
1
  .ApplicationHeader {
7
2
  background-color: @color-white;
8
- border-bottom: 1px solid @gray-light;
9
- border-left: none;
10
- border-right: none;
11
- border-top: none;
3
+ border: none;
12
4
  display: flex;
13
5
  float: none !important;
14
6
  margin-bottom: 0;
@@ -64,7 +56,7 @@
64
56
  background-image: @navbar-brand-icon !important;
65
57
  background-size: cover;
66
58
  display: block;
67
- height: @navbar-height-without-border;
59
+ height: @navbar-height;
68
60
  margin: 0;
69
61
  padding: 0;
70
62
  position: relative;
@@ -91,241 +83,6 @@
91
83
  }
92
84
  }
93
85
 
94
- .navbar-nav {
95
- float: none;
96
- margin: 0;
97
-
98
- > li {
99
- float: none !important;
100
-
101
- > a {
102
- line-height: @navbar-height-without-border - (@navbar-padding-vertical * 2);
103
- padding-bottom: @navbar-padding-vertical;
104
- padding-top: @navbar-padding-vertical;
105
- }
106
- }
107
-
108
- &:not(.navbar-right) {
109
- > li {
110
- &:empty {
111
- display: none;
112
- }
113
-
114
- &:empty + .submodule,
115
- &:first-child:not(:empty) {
116
- margin-left: 15px;
117
- }
118
-
119
- > a {
120
- background-color: transparent;
121
- color: @gray;
122
- cursor: pointer;
123
- font-size: 14px;
124
- font-weight: @font-medium;
125
- margin: 0 15px;
126
- padding: 15px 0;
127
- text-transform: uppercase;
128
- transition: all 100ms ease-in-out;
129
- user-select: none;
130
- }
131
-
132
- &.disabled,
133
- &:disabled {
134
- > a {
135
- color: @gray-light
136
- }
137
- }
138
-
139
- &:not(.disabled):not(:disabled) {
140
- > a.active,
141
- &.active > a,
142
- &:focus > a,
143
- &:hover > a {
144
- &:not(.disabled):not(:disabled) {
145
- background-color: transparent;
146
- box-shadow: inset 0 -3px 0 @color-black, 0 1px 0 @color-black;
147
- color: @color-black;
148
-
149
- &:after {
150
- background-color: @color-black;
151
- height: 3px;
152
- width: 100%;
153
- z-index: 1;
154
- }
155
- }
156
- }
157
- }
158
-
159
- &.dropdown {
160
- &.active > a,
161
- &:hover > a {
162
- box-shadow: none;
163
- }
164
-
165
- > .dropdown-menu {
166
- border: none;
167
- }
168
- }
169
- }
170
- }
171
- }
172
-
173
- .ModuleNavigation {
174
- border: none;
175
- height: @navbar-height-without-border;
176
- line-height: @navbar-height-without-border;
177
- list-style: none;
178
- margin-bottom: 0;
179
- padding-left: 0;
180
- position: relative;
181
-
182
- // avoid floating content on mobile
183
- max-width: calc(~'100% - @{navbar-height}');
184
-
185
- // NOTE: enforce it with important so all services look similar
186
- background-color: @color-white !important;
187
- color: @color-black !important;
188
-
189
- .dropdown {
190
- width: 300px;
191
-
192
- &.open {
193
- background-color: inherit;
194
-
195
- .ModuleNavigation-dropdown,
196
- .dropdown-toggle {
197
- &:after {
198
- bottom: 0;
199
- top: 0;
200
- }
201
- }
202
- }
203
- }
204
-
205
- .ModuleNavigation-dropdown,
206
- .dropdown-toggle {
207
- align-items: center;
208
- display: flex;
209
- padding: 0;
210
-
211
- &.inactive {
212
- pointer-events: none;
213
- }
214
-
215
- // Style the separator between main dropdown and submodules
216
- &:after {
217
- background-color: @gray-lighter;
218
- bottom: 15px;
219
- content: '';
220
- display: block;
221
- position: absolute;
222
- right: 0;
223
- top: 15px;
224
- transition: all 0.1s ease-in-out;
225
- width: 3px;
226
- }
227
-
228
- &:first-child:not(:last-child) {
229
- &:hover:after {
230
- bottom: 0;
231
- top: 0;
232
- }
233
- }
234
-
235
- > span {
236
- &:not(.caret) {
237
- .ellipsis-1;
238
- flex: 1 0 auto;
239
- //max-width: @navbar-application-dropdown-width - @navbar-height;
240
- padding-left: @navbar-padding-horizontal;
241
- }
242
-
243
- &.caret {
244
- margin: 0;
245
- text-align: center;
246
- width: @navbar-height;
247
- }
248
- }
249
- }
250
-
251
- // Style for the main dropdown
252
- > li > a,
253
- > a {
254
- background-color: transparent;
255
- color: inherit;
256
- font-size: 18px;
257
- font-weight: @font-medium;
258
- text-decoration: none;
259
- text-transform: uppercase;
260
- }
261
-
262
- .dropdown-menu {
263
- -webkit-overflow-scrolling: touch;
264
- border: none;
265
- border-radius: 0 0 @border-radius-default @border-radius-default;
266
- max-height: ~'calc(100vh - @{navbar-height} - 20px)'; // --vh fallback
267
- max-height: ~'calc(var(--vh, 1vh) * 100 - @{navbar-height} - 20px)';
268
- max-width: calc(~'100% - 3px');
269
- width: 100%;
270
- overflow-x: hidden;
271
- overflow-y: auto;
272
-
273
- > li > a {
274
- color: @color-black;
275
- font-size: 14px;
276
- font-weight: @font-medium;
277
- padding: 5px @navbar-padding-horizontal;
278
- text-transform: uppercase;
279
-
280
- &.inactive {
281
- pointer-events: none;
282
- }
283
- }
284
- }
285
-
286
- &.hasModules,
287
- &.hasModules > li > a {
288
- cursor: pointer;
289
- }
290
-
291
- > li > a {
292
- .ellipsis-1;
293
- cursor: default;
294
- height: 100%;
295
- padding-left: @navbar-padding-horizontal;
296
- }
297
- }
298
-
299
- .SubmoduleNavigation {
300
- display: flex;
301
- flex: 1 1 0;
302
-
303
- .submodule {
304
- white-space: nowrap;
305
-
306
- &.offscreen {
307
- opacity: 0;
308
- position: absolute;
309
- }
310
- }
311
-
312
- .CollapsedDropdown {
313
- > .dropdown-menu {
314
- left: auto;
315
- right: 0;
316
- }
317
-
318
- > .dropdown-toggle {
319
- margin: 0 !important;
320
- padding: 15px 15px !important;
321
-
322
- .rioglyph-option-horizontal {
323
- font-size: 18px;
324
- }
325
- }
326
- }
327
- }
328
-
329
86
  .ApplicationActionBar {
330
87
  background-color: @color-white;
331
88
  cursor: auto;
@@ -436,3 +193,245 @@
436
193
  margin-bottom: 5px;
437
194
  }
438
195
  }
196
+
197
+ .ModuleNavigation {
198
+ border-bottom: 1px solid @gray-light;
199
+ height: @navbar-height;
200
+ line-height: @navbar-height;
201
+ list-style: none;
202
+ margin-bottom: 0;
203
+ padding-left: 0;
204
+ position: relative;
205
+
206
+ // avoid floating content on mobile
207
+ max-width: calc(~'100% - @{navbar-height}');
208
+
209
+ // NOTE: enforce it with important so all services look similar
210
+ background-color: @color-white !important;
211
+ color: @color-black !important;
212
+
213
+ .dropdown {
214
+ width: 300px;
215
+
216
+ &.open {
217
+ background-color: inherit;
218
+
219
+ .ModuleNavigation-dropdown,
220
+ .dropdown-toggle {
221
+ &:after {
222
+ bottom: 0;
223
+ top: 0;
224
+ }
225
+ }
226
+ }
227
+ }
228
+
229
+ .ModuleNavigation-dropdown,
230
+ .dropdown-toggle {
231
+ align-items: center;
232
+ display: flex;
233
+ padding: 0;
234
+
235
+ &.inactive {
236
+ pointer-events: none;
237
+ }
238
+
239
+ // Style the separator between main dropdown and submodules
240
+ &:after {
241
+ background-color: @gray-lighter;
242
+ bottom: 15px;
243
+ content: '';
244
+ display: block;
245
+ position: absolute;
246
+ right: 0;
247
+ top: 15px;
248
+ transition: all 0.1s ease-in-out;
249
+ width: 3px;
250
+ }
251
+
252
+ &:first-child:not(:last-child) {
253
+ &:hover:after {
254
+ bottom: 0;
255
+ top: 0;
256
+ }
257
+ }
258
+
259
+ > span {
260
+ &:not(.caret) {
261
+ .ellipsis-1;
262
+ flex: 1 0 auto;
263
+ //max-width: @navbar-application-dropdown-width - @navbar-height;
264
+ padding-left: @navbar-padding-horizontal;
265
+ }
266
+
267
+ &.caret {
268
+ margin: 0;
269
+ text-align: center;
270
+ width: @navbar-height;
271
+ }
272
+ }
273
+ }
274
+
275
+ // Style for the main dropdown
276
+ > li > a,
277
+ > a {
278
+ background-color: transparent;
279
+ color: inherit;
280
+ font-size: 18px;
281
+ font-weight: @font-medium;
282
+ text-decoration: none;
283
+ text-transform: uppercase;
284
+ }
285
+
286
+ .dropdown-menu {
287
+ -webkit-overflow-scrolling: touch;
288
+ border: none;
289
+ border-radius: 0 0 @border-radius-default @border-radius-default;
290
+ max-height: ~'calc(100vh - @{navbar-height} - 20px)'; // --vh fallback
291
+ max-height: ~'calc(var(--vh, 1vh) * 100 - @{navbar-height} - 20px)';
292
+ max-width: calc(~'100% - 3px');
293
+ width: 100%;
294
+ overflow-x: hidden;
295
+ overflow-y: auto;
296
+
297
+ > li > a {
298
+ color: @color-black;
299
+ font-size: 14px;
300
+ font-weight: @font-medium;
301
+ padding: 5px @navbar-padding-horizontal;
302
+ text-transform: uppercase;
303
+
304
+ &.inactive {
305
+ pointer-events: none;
306
+ }
307
+ }
308
+ }
309
+
310
+ &.hasModules,
311
+ &.hasModules > li > a {
312
+ cursor: pointer;
313
+ }
314
+
315
+ > li > a {
316
+ .ellipsis-1;
317
+ cursor: default;
318
+ height: 100%;
319
+ padding-left: @navbar-padding-horizontal;
320
+ }
321
+ }
322
+
323
+ .SubmoduleNavigation {
324
+ border-bottom: 1px solid @gray-light;
325
+ height: @navbar-height;
326
+ display: flex;
327
+ flex: 1 1 0;
328
+
329
+ .ApplicationLayoutBodyNavigation & {
330
+ border-bottom: none;
331
+
332
+ .submodule:first-of-type > a {
333
+ margin-left: 0;
334
+ }
335
+
336
+ @media (max-width: @screen-xs-max) {
337
+ padding-left: @ApplicationLayoutBodyPadding*0.5;
338
+ }
339
+
340
+ @media (min-width: @screen-ls) {
341
+ padding-left: @ApplicationLayoutBodyPadding;
342
+ }
343
+ }
344
+
345
+ .ApplicationLayoutBodyNavigation.has-offset & {
346
+ @media (min-width: @screen-ls) {
347
+ padding-left: 380px;
348
+ }
349
+ }
350
+
351
+ .ApplicationHeader:not(.mobile) & {
352
+ padding-left: 15px;
353
+ }
354
+
355
+ > .submodule {
356
+ white-space: nowrap;
357
+
358
+ &:empty {
359
+ display: none;
360
+ }
361
+
362
+ > a {
363
+ background-color: transparent;
364
+ color: @gray;
365
+ cursor: pointer;
366
+ font-size: 14px;
367
+ margin: 0 15px;
368
+ padding: 15px 0;
369
+ transition: all 100ms ease-in-out;
370
+ user-select: none;
371
+
372
+ .ApplicationHeader & {
373
+ font-weight: @font-medium;
374
+ text-transform: uppercase;
375
+ }
376
+ }
377
+
378
+ &.disabled,
379
+ &:disabled {
380
+ > a {
381
+ color: @gray-light
382
+ }
383
+ }
384
+
385
+ &:not(.disabled):not(:disabled) {
386
+ > a.active,
387
+ &.active > a,
388
+ &:focus > a,
389
+ &:hover > a {
390
+ &:not(.disabled):not(:disabled) {
391
+ background-color: transparent;
392
+ box-shadow: inset 0 -4px 0 @color-black, 0 0px 0 @color-black;
393
+ color: @color-black;
394
+
395
+ &:after {
396
+ background-color: @color-black;
397
+ height: 3px;
398
+ width: 100%;
399
+ z-index: 1;
400
+ }
401
+ }
402
+ }
403
+ }
404
+
405
+ &.dropdown {
406
+ &.active > a,
407
+ &:hover > a {
408
+ box-shadow: none;
409
+ }
410
+
411
+ > .dropdown-menu {
412
+ border: none;
413
+ }
414
+ }
415
+
416
+ &.offscreen {
417
+ opacity: 0;
418
+ position: absolute;
419
+ }
420
+ }
421
+
422
+ .CollapsedDropdown {
423
+ > .dropdown-menu {
424
+ left: auto;
425
+ right: 0;
426
+ }
427
+
428
+ > .dropdown-toggle {
429
+ margin: 0 !important;
430
+ padding: 15px 15px !important;
431
+
432
+ .rioglyph-option-horizontal {
433
+ font-size: 18px;
434
+ }
435
+ }
436
+ }
437
+ }
@@ -52,6 +52,7 @@
52
52
  height: @ApplicationLayoutBodyHeightWithoutFooterAndViewportFix;
53
53
  }
54
54
 
55
+ // TODO remove with v1.0 (downward compatibility) - remove when cleanup
55
56
  .ApplicationLayoutBodyNavigation {
56
57
  &:not(.unstyled) {
57
58
  align-items: center;
@@ -59,16 +60,18 @@
59
60
  border-bottom: 1px solid @gray-light;
60
61
  display: flex;
61
62
  justify-content: space-between;
62
- padding: 0 @ApplicationLayoutBodyPadding*0.25 0 @ApplicationLayoutBodyPadding*0.5;
63
+ // padding: 0 @ApplicationLayoutBodyPadding*0.25 0 @ApplicationLayoutBodyPadding*0.5;
63
64
  }
64
65
 
65
- &:not(.header-has-no-application-menu) {
66
- @media (min-width: @screen-lg) {
67
- padding-left: 365px;
68
- }
69
- }
66
+ // &:not(.header-has-no-application-menu) {
67
+ // @media (min-width: @screen-lg) {
68
+ // padding-left: 365px;
69
+ // }
70
+ // }
70
71
 
71
72
  .nav-pills {
73
+ padding-left: @ApplicationLayoutBodyPadding*0.5;
74
+
72
75
  &:not(.nav-stacked) {
73
76
  box-shadow: none;
74
77
 
@@ -96,6 +99,7 @@
96
99
  }
97
100
  }
98
101
  }
102
+ // END TODO
99
103
 
100
104
  body:not(.modal-open) & {
101
105
  -webkit-overflow-scrolling: touch;
@@ -237,10 +237,6 @@
237
237
 
238
238
  .TreeHead {
239
239
  min-height: 50px;
240
-
241
- .TreeSelectAll {
242
- margin-right: 5px;
243
- }
244
240
  }
245
241
 
246
242
  &Options {
@@ -318,9 +318,12 @@
318
318
 
319
319
  &:before {
320
320
  .rioglyph;
321
+ animation-name: spinning;
322
+ animation-duration: 1s;
323
+ animation-iteration-count: infinite;
324
+ animation-timing-function: linear;
321
325
  content: "\e9c7";
322
326
  color: @brand-primary;
323
- animation: spinning 1s linear infinite;
324
327
  font-size: 20px;
325
328
  }
326
329
 
@@ -1,16 +1,5 @@
1
1
  @import (less) '../../fonts/rioglyph/rioglyph.less';
2
2
 
3
- @keyframes spinning {
4
- from { transform: rotate(0deg) }
5
- to { transform: rotate(359deg) }
6
- }
7
-
8
- @keyframes pulse {
9
- 50% {
10
- opacity:.5
11
- }
12
- }
13
-
14
3
  .rioglyph {
15
4
  &.spinning:before {
16
5
  display: inline-block;
@@ -19,6 +8,6 @@
19
8
 
20
9
  &.pulsing:before {
21
10
  display: inline-block;
22
- animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite;
11
+ animation: pulsing 2s cubic-bezier(.4,0,.6,1) infinite;
23
12
  }
24
13
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  @font-face {
4
4
  font-family: "rioglyph";
5
- src: url("rioglyph.woff?e23ee3a7ff7e24c90f6028227ebcb825") format("woff");
5
+ src: url("rioglyph.woff?7f231bbdc753b7ce84dddda5bd0792c4") format("woff");
6
6
  font-weight: normal;
7
7
  font-style: normal;
8
8
  }
@@ -609,6 +609,11 @@
609
609
  .hover-rioglyph-heart:hover:before {
610
610
  content: "\e005";
611
611
  }
612
+ @rioglyph-heating: "\f19a";
613
+ .rioglyph-heating:before,
614
+ .hover-rioglyph-heating:hover:before {
615
+ content: "\f19a";
616
+ }
612
617
  @rioglyph-home-sign: "\f142";
613
618
  .rioglyph-home-sign:before,
614
619
  .hover-rioglyph-home-sign:hover:before {
@@ -1429,6 +1434,51 @@
1429
1434
  .hover-rioglyph-volume:hover:before {
1430
1435
  content: "\f13c";
1431
1436
  }
1437
+ @rioglyph-weather-cloudy: "\f191";
1438
+ .rioglyph-weather-cloudy:before,
1439
+ .hover-rioglyph-weather-cloudy:hover:before {
1440
+ content: "\f191";
1441
+ }
1442
+ @rioglyph-weather-icy: "\f192";
1443
+ .rioglyph-weather-icy:before,
1444
+ .hover-rioglyph-weather-icy:hover:before {
1445
+ content: "\f192";
1446
+ }
1447
+ @rioglyph-weather-overcast: "\f193";
1448
+ .rioglyph-weather-overcast:before,
1449
+ .hover-rioglyph-weather-overcast:hover:before {
1450
+ content: "\f193";
1451
+ }
1452
+ @rioglyph-weather-raining-heavy: "\f194";
1453
+ .rioglyph-weather-raining-heavy:before,
1454
+ .hover-rioglyph-weather-raining-heavy:hover:before {
1455
+ content: "\f194";
1456
+ }
1457
+ @rioglyph-weather-raining: "\f195";
1458
+ .rioglyph-weather-raining:before,
1459
+ .hover-rioglyph-weather-raining:hover:before {
1460
+ content: "\f195";
1461
+ }
1462
+ @rioglyph-weather-snowing: "\f196";
1463
+ .rioglyph-weather-snowing:before,
1464
+ .hover-rioglyph-weather-snowing:hover:before {
1465
+ content: "\f196";
1466
+ }
1467
+ @rioglyph-weather-stormy: "\f197";
1468
+ .rioglyph-weather-stormy:before,
1469
+ .hover-rioglyph-weather-stormy:hover:before {
1470
+ content: "\f197";
1471
+ }
1472
+ @rioglyph-weather-sunny: "\f198";
1473
+ .rioglyph-weather-sunny:before,
1474
+ .hover-rioglyph-weather-sunny:hover:before {
1475
+ content: "\f198";
1476
+ }
1477
+ @rioglyph-weather-windy: "\f199";
1478
+ .rioglyph-weather-windy:before,
1479
+ .hover-rioglyph-weather-windy:hover:before {
1480
+ content: "\f199";
1481
+ }
1432
1482
  @rioglyph-warning-sign: "\e986";
1433
1483
  .rioglyph-warning-sign:before,
1434
1484
  .hover-rioglyph-warning-sign:hover:before {
@@ -1449,6 +1499,11 @@
1449
1499
  .hover-rioglyph-wifi:hover:before {
1450
1500
  content: "\f125";
1451
1501
  }
1502
+ @rioglyph-wifi-off: "\f190";
1503
+ .rioglyph-wifi-off:before,
1504
+ .hover-rioglyph-wifi-off:hover:before {
1505
+ content: "\f190";
1506
+ }
1452
1507
  @rioglyph-workshop: "\f1a9";
1453
1508
  .rioglyph-workshop:before,
1454
1509
  .hover-rioglyph-workshop:hover:before {