@rio-cloud/rio-uikit 0.16.1 → 0.16.2-beta.3

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 (241) hide show
  1. package/ColorScheme.d.ts +4 -0
  2. package/ColorScheme.js +2 -0
  3. package/Colors.js +1 -1
  4. package/TruckLayer.js +1 -1
  5. package/components/assetTree/Tree.js +1 -1
  6. package/components/charts/chartHelper.js +1 -1
  7. package/components/map/components/Map.js +147 -130
  8. package/components/map/components/constants.js +4 -1
  9. package/components/map/components/features/layers/RoadRestrictionLayer.js +26 -0
  10. package/components/map/components/features/layers/TrafficLayer.js +19 -6
  11. package/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +20 -0
  12. package/components/map/components/features/layers/baselayers/DefaultVectorLayer.js +14 -0
  13. package/components/map/components/features/layers/baselayers/FleetStyleLayer.js +13 -17
  14. package/components/map/components/features/layers/baselayers/SatelliteLayer.js +13 -17
  15. package/components/map/components/features/layers/baselayers/TerrainLayer.js +13 -17
  16. package/components/map/components/features/layers/baselayers/useBaseLayer.js +41 -0
  17. package/components/map/components/mapUtils.js +4 -1
  18. package/components/mapMarker/ClusterMapMarker.js +2 -2
  19. package/components/mapMarker/SingleMapMarker.js +2 -2
  20. package/components/sidebars/Sidebar.js +2 -2
  21. package/hooks/useHereMap.ts +23 -0
  22. package/hooks/useScripts.ts +52 -0
  23. package/hooks/useScrollPosition.js +72 -0
  24. package/index.js +4 -1
  25. package/lib/es/ColorScheme.d.ts +4 -0
  26. package/lib/es/ColorScheme.js +18 -0
  27. package/lib/es/Colors.js +1 -1
  28. package/lib/es/TruckLayer.js +2 -2
  29. package/lib/es/components/assetTree/Tree.js +1 -1
  30. package/lib/es/components/charts/chartHelper.js +1 -1
  31. package/lib/es/components/map/components/Map.js +145 -125
  32. package/lib/es/components/map/components/constants.js +3 -0
  33. package/lib/es/components/map/components/features/layers/RoadRestrictionLayer.js +34 -0
  34. package/lib/es/components/map/components/features/layers/TrafficLayer.js +18 -6
  35. package/lib/es/components/map/components/features/layers/baselayers/DefaultRasterLayer.js +26 -0
  36. package/lib/es/components/map/components/features/layers/baselayers/DefaultVectorLayer.js +21 -0
  37. package/lib/es/components/map/components/features/layers/baselayers/FleetStyleLayer.js +13 -18
  38. package/lib/es/components/map/components/features/layers/baselayers/SatelliteLayer.js +13 -18
  39. package/lib/es/components/map/components/features/layers/baselayers/TerrainLayer.js +13 -18
  40. package/lib/es/components/map/components/features/layers/baselayers/useBaseLayer.js +49 -0
  41. package/lib/es/components/map/components/mapUtils.js +6 -3
  42. package/lib/es/components/mapMarker/ClusterMapMarker.js +2 -2
  43. package/lib/es/components/mapMarker/SingleMapMarker.js +2 -2
  44. package/lib/es/components/sidebars/Sidebar.js +2 -2
  45. package/lib/es/hooks/useHereMap.ts +23 -0
  46. package/lib/es/hooks/useScripts.ts +52 -0
  47. package/lib/es/hooks/useScrollPosition.js +80 -0
  48. package/lib/es/index.js +24 -1
  49. package/lib/es/mapIndex.js +2 -2
  50. package/lib/es/styles/components/Activity.less +9 -10
  51. package/lib/es/styles/components/ApplicationHeader.less +24 -29
  52. package/lib/es/styles/components/ApplicationLayout.less +7 -7
  53. package/lib/es/styles/components/AssetTree.less +30 -28
  54. package/lib/es/styles/components/AutoSuggest.less +2 -2
  55. package/lib/es/styles/components/BottomSheet.less +1 -2
  56. package/lib/es/styles/components/Carousel.less +13 -9
  57. package/lib/es/styles/components/Checkbox.less +15 -16
  58. package/lib/es/styles/components/ClearableInput.less +3 -3
  59. package/lib/es/styles/components/Counter.less +12 -12
  60. package/lib/es/styles/components/DataTabs.less +2 -2
  61. package/lib/es/styles/components/DatePicker.less +27 -27
  62. package/lib/es/styles/components/Dialog.less +15 -11
  63. package/lib/es/styles/components/Dropdown.less +11 -11
  64. package/lib/es/styles/components/Expander.less +7 -7
  65. package/lib/es/styles/components/ListMenu.less +8 -8
  66. package/lib/es/styles/components/MapHere.less +3 -2
  67. package/lib/es/styles/components/MapMarker.less +16 -17
  68. package/lib/es/styles/components/MapSettings.less +5 -5
  69. package/lib/es/styles/components/NoData.less +1 -1
  70. package/lib/es/styles/components/Notification.less +12 -12
  71. package/lib/es/styles/components/RadioButton.less +11 -12
  72. package/lib/es/styles/components/Resizer.less +1 -1
  73. package/lib/es/styles/components/Select.less +16 -26
  74. package/lib/es/styles/components/Sidebar.less +29 -21
  75. package/lib/es/styles/components/Slider.less +18 -18
  76. package/lib/es/styles/components/Spinner.less +6 -6
  77. package/lib/es/styles/components/StatsWidget.less +5 -5
  78. package/lib/es/styles/components/SteppedProgressBar.less +32 -29
  79. package/lib/es/styles/components/SupportMarker.less +1 -1
  80. package/lib/es/styles/components/Switch.less +8 -8
  81. package/lib/es/styles/components/TableSettingsDialog.less +7 -7
  82. package/lib/es/styles/components/TableToolbar.less +1 -1
  83. package/lib/es/styles/components/Tag.less +10 -10
  84. package/lib/es/styles/components/Timeline.less +3 -3
  85. package/lib/es/styles/components/Tooltip.less +10 -10
  86. package/lib/es/styles/design/badges.less +10 -10
  87. package/lib/es/styles/design/border.less +1 -1
  88. package/lib/es/styles/design/breadcrumbs.less +2 -2
  89. package/lib/es/styles/design/button-groups.less +25 -1
  90. package/lib/es/styles/design/buttons.less +53 -109
  91. package/lib/es/styles/design/callouts.less +3 -3
  92. package/lib/es/styles/design/code.less +4 -6
  93. package/lib/es/styles/design/colors.less +20 -20
  94. package/lib/es/styles/design/form-input-groups.less +4 -4
  95. package/lib/es/styles/design/form-inputs.less +33 -31
  96. package/lib/es/styles/design/images.less +2 -2
  97. package/lib/es/styles/design/labels.less +11 -11
  98. package/lib/es/styles/design/list-group.less +14 -12
  99. package/lib/es/styles/design/navs.less +27 -27
  100. package/lib/es/styles/design/normalize.less +0 -9
  101. package/lib/es/styles/design/pagination.less +10 -10
  102. package/lib/es/styles/design/panels.less +10 -10
  103. package/lib/es/styles/design/popovers.less +8 -8
  104. package/lib/es/styles/design/progress-bars.less +8 -8
  105. package/lib/es/styles/design/shadows.less +14 -7
  106. package/lib/es/styles/design/tables.less +68 -106
  107. package/lib/es/styles/design/text.less +5 -19
  108. package/lib/es/styles/design/theme.less +10 -10
  109. package/lib/es/styles/design/thumbnails.less +2 -2
  110. package/lib/es/styles/design/type.less +4 -4
  111. package/lib/es/styles/design/wells.less +1 -1
  112. package/lib/es/styles/mapping/color-map.less +65 -64
  113. package/lib/es/styles/mixins/_imports.less +14 -0
  114. package/lib/es/styles/mixins/buttons.less +24 -56
  115. package/lib/es/styles/mixins/forms.less +19 -55
  116. package/lib/es/styles/mixins/hsl.less +19 -0
  117. package/lib/es/styles/mixins/panels.less +2 -2
  118. package/lib/es/styles/print/print.less +7 -7
  119. package/lib/es/styles/rio-uikit-core.less +2 -2
  120. package/lib/es/styles/rio-uikit-print-utilities.less +2 -2
  121. package/lib/es/styles/rio-uikit-responsive-utilities.less +2 -2
  122. package/lib/es/styles/variables/_index.less +196 -0
  123. package/lib/es/styles/variables/colors.json +67 -0
  124. package/lib/es/styles/variables/concated_css_variables.less +66 -0
  125. package/lib/es/styles/variables/dark_colors.less +88 -0
  126. package/lib/es/styles/variables/dark_css_variables.less +28 -0
  127. package/lib/es/styles/variables/dark_css_variables_map.less +96 -0
  128. package/lib/es/styles/variables/light_colors.less +92 -0
  129. package/lib/es/styles/variables/light_css_variables.less +17 -0
  130. package/lib/es/styles/variables/light_css_variables_map.less +100 -0
  131. package/lib/es/styles/variables/screens.less +7 -0
  132. package/lib/es/styles/variables/text.less +23 -0
  133. package/lib/es/themes/BuyButton/styles/rio-buyButton.less +13 -8
  134. package/lib/es/themes/MAN/styles/man-uikit.less +3 -0
  135. package/lib/es/themes/SCANIA/styles/scania-uikit.less +3 -0
  136. package/lib/es/themes/Volkswagen/styles/vw-uikit.less +21 -30
  137. package/lib/es/themes/Website/styles/rio-website.less +145 -120
  138. package/lib/es/themes/Xmas/styles/rio-xmas.less +59 -29
  139. package/lib/es/types.ts +6 -1
  140. package/lib/es/useScrollPosition.d.ts +4 -0
  141. package/lib/es/useScrollPosition.js +13 -0
  142. package/lib/es/utils/colorScheme.js +59 -0
  143. package/lib/es/utils/init.js +2 -0
  144. package/lib/es/version.json +1 -1
  145. package/mapIndex.js +1 -1
  146. package/package.json +4 -3
  147. package/styles/components/Activity.less +9 -10
  148. package/styles/components/ApplicationHeader.less +24 -29
  149. package/styles/components/ApplicationLayout.less +7 -7
  150. package/styles/components/AssetTree.less +30 -28
  151. package/styles/components/AutoSuggest.less +2 -2
  152. package/styles/components/BottomSheet.less +1 -2
  153. package/styles/components/Carousel.less +13 -9
  154. package/styles/components/Checkbox.less +15 -16
  155. package/styles/components/ClearableInput.less +3 -3
  156. package/styles/components/Counter.less +12 -12
  157. package/styles/components/DataTabs.less +2 -2
  158. package/styles/components/DatePicker.less +27 -27
  159. package/styles/components/Dialog.less +15 -11
  160. package/styles/components/Dropdown.less +11 -11
  161. package/styles/components/Expander.less +7 -7
  162. package/styles/components/ListMenu.less +8 -8
  163. package/styles/components/MapHere.less +3 -2
  164. package/styles/components/MapMarker.less +16 -17
  165. package/styles/components/MapSettings.less +5 -5
  166. package/styles/components/NoData.less +1 -1
  167. package/styles/components/Notification.less +12 -12
  168. package/styles/components/RadioButton.less +11 -12
  169. package/styles/components/Resizer.less +1 -1
  170. package/styles/components/Select.less +16 -26
  171. package/styles/components/Sidebar.less +29 -21
  172. package/styles/components/Slider.less +18 -18
  173. package/styles/components/Spinner.less +6 -6
  174. package/styles/components/StatsWidget.less +5 -5
  175. package/styles/components/SteppedProgressBar.less +32 -29
  176. package/styles/components/SupportMarker.less +1 -1
  177. package/styles/components/Switch.less +8 -8
  178. package/styles/components/TableSettingsDialog.less +7 -7
  179. package/styles/components/TableToolbar.less +1 -1
  180. package/styles/components/Tag.less +10 -10
  181. package/styles/components/Timeline.less +3 -3
  182. package/styles/components/Tooltip.less +10 -10
  183. package/styles/design/badges.less +10 -10
  184. package/styles/design/border.less +1 -1
  185. package/styles/design/breadcrumbs.less +2 -2
  186. package/styles/design/button-groups.less +25 -1
  187. package/styles/design/buttons.less +53 -109
  188. package/styles/design/callouts.less +3 -3
  189. package/styles/design/code.less +4 -6
  190. package/styles/design/colors.less +20 -20
  191. package/styles/design/form-input-groups.less +4 -4
  192. package/styles/design/form-inputs.less +33 -31
  193. package/styles/design/images.less +2 -2
  194. package/styles/design/labels.less +11 -11
  195. package/styles/design/list-group.less +14 -12
  196. package/styles/design/navs.less +27 -27
  197. package/styles/design/normalize.less +0 -9
  198. package/styles/design/pagination.less +10 -10
  199. package/styles/design/panels.less +10 -10
  200. package/styles/design/popovers.less +8 -8
  201. package/styles/design/progress-bars.less +8 -8
  202. package/styles/design/shadows.less +14 -7
  203. package/styles/design/tables.less +68 -106
  204. package/styles/design/text.less +5 -19
  205. package/styles/design/theme.less +10 -10
  206. package/styles/design/thumbnails.less +2 -2
  207. package/styles/design/type.less +4 -4
  208. package/styles/design/wells.less +1 -1
  209. package/styles/mapping/color-map.less +65 -64
  210. package/styles/mixins/_imports.less +14 -0
  211. package/styles/mixins/buttons.less +24 -56
  212. package/styles/mixins/forms.less +19 -55
  213. package/styles/mixins/hsl.less +19 -0
  214. package/styles/mixins/panels.less +2 -2
  215. package/styles/print/print.less +7 -7
  216. package/styles/rio-uikit-core.less +2 -2
  217. package/styles/rio-uikit-print-utilities.less +2 -2
  218. package/styles/rio-uikit-responsive-utilities.less +2 -2
  219. package/styles/variables/_index.less +196 -0
  220. package/styles/variables/colors.json +67 -0
  221. package/styles/variables/concated_css_variables.less +66 -0
  222. package/styles/variables/dark_colors.less +88 -0
  223. package/styles/variables/dark_css_variables.less +28 -0
  224. package/styles/variables/dark_css_variables_map.less +96 -0
  225. package/styles/variables/light_colors.less +92 -0
  226. package/styles/variables/light_css_variables.less +17 -0
  227. package/styles/variables/light_css_variables_map.less +100 -0
  228. package/styles/variables/screens.less +7 -0
  229. package/styles/variables/text.less +23 -0
  230. package/themes/BuyButton/styles/rio-buyButton.less +13 -8
  231. package/themes/MAN/styles/man-uikit.less +3 -0
  232. package/themes/SCANIA/styles/scania-uikit.less +3 -0
  233. package/themes/Volkswagen/styles/vw-uikit.less +21 -30
  234. package/themes/Website/styles/rio-website.less +145 -120
  235. package/themes/Xmas/styles/rio-xmas.less +59 -29
  236. package/types.ts +6 -1
  237. package/useScrollPosition.d.ts +4 -0
  238. package/useScrollPosition.js +2 -0
  239. package/utils/colorScheme.js +50 -0
  240. package/utils/init.js +2 -0
  241. package/version.json +1 -1
@@ -1,7 +1,7 @@
1
1
  .badge {
2
- background-color: @brand-primary;
2
+ background-color: var(--brand-primary);
3
3
  border-radius: @border-radius-round;
4
- color: @color-white;
4
+ color: var(--color-white);
5
5
  display: inline-block;
6
6
  font-size: 12px;
7
7
  font-weight: normal;
@@ -37,7 +37,7 @@
37
37
  transform: translate(50%, -50%);
38
38
 
39
39
  .ActionBarItemIcon & {
40
- border: 2px solid @color-white;
40
+ border: 2px solid var(--color-white);
41
41
  left: 50%;
42
42
  position: absolute;
43
43
  right: auto;
@@ -46,7 +46,7 @@
46
46
  }
47
47
 
48
48
  &-border {
49
- border: 2px solid @color-white;
49
+ border: 2px solid var(--color-white);
50
50
  }
51
51
 
52
52
  &-pinging {
@@ -74,23 +74,23 @@
74
74
  // warning
75
75
  // danger
76
76
  &-muted {
77
- color: @gray-dark;
78
- box-shadow: inset 0px 0px 0px 1px @gray-light;
79
- background-color: @gray-lightest;
77
+ color: var(--gray-dark);
78
+ box-shadow: inset 0px 0px 0px 1px var(--gray-light);
79
+ background-color: var(--gray-lightest);
80
80
 
81
81
  &.badge-indicator-pinging {
82
82
  &:before {
83
- background-color: @gray-light;
83
+ background-color: var(--gray-light);
84
84
  }
85
85
  }
86
86
  }
87
87
 
88
88
  &-default {
89
- background-color: @gray-dark;
89
+ background-color: var(--gray-dark);
90
90
 
91
91
  &.badge-indicator-pinging {
92
92
  &:before {
93
- background-color: @gray-dark;
93
+ background-color: var(--gray-dark);
94
94
  }
95
95
  }
96
96
  }
@@ -1,7 +1,7 @@
1
1
  // default values used as shorthand ".border" class
2
2
  // no !important here, because other classes will not work then
3
3
  .border {
4
- border-color: @gray-light;
4
+ border-color: var(--gray-light);
5
5
  border-style: solid;
6
6
  border-width: 1px;
7
7
  }
@@ -7,14 +7,14 @@
7
7
  display: inline-block;
8
8
 
9
9
  + li:before {
10
- color: @gray-light;
10
+ color: var(--gray-light);
11
11
  content: "/";
12
12
  padding: 0 5px;
13
13
  }
14
14
  }
15
15
 
16
16
  > .active {
17
- color: @gray-dark;
17
+ color: var(--gray-dark);
18
18
  cursor: default;
19
19
  }
20
20
  }
@@ -77,6 +77,30 @@
77
77
  .btn-group > .btn + .dropdown-toggle {
78
78
  padding-left: 8px;
79
79
  padding-right: 8px;
80
+
81
+ &.btn-primary {
82
+ border-left-color: .hslb(@brand-primary-hsl, '-', @btn-hover-border-brightness)[@result];
83
+ }
84
+
85
+ &.btn-secondary {
86
+ border-left-color: .hslb(@brand-secondary-hsl, '-', @btn-hover-border-brightness)[@result];
87
+ }
88
+
89
+ &.btn-info {
90
+ border-left-color: .hslb(@brand-info-hsl, '-', @btn-hover-border-brightness)[@result];
91
+ }
92
+
93
+ &.btn-success {
94
+ border-left-color: .hslb(@brand-success-hsl, '-', @btn-hover-border-brightness)[@result];
95
+ }
96
+
97
+ &.btn-warning {
98
+ border-left-color: .hslb(@brand-warning-hsl, '-', @btn-hover-border-brightness)[@result];
99
+ }
100
+
101
+ &.btn-danger {
102
+ border-left-color: .hslb(@brand-danger-hsl, '-', @btn-hover-border-brightness)[@result];
103
+ }
80
104
  }
81
105
 
82
106
  .btn-group > .btn-lg + .dropdown-toggle {
@@ -87,7 +111,7 @@
87
111
  // The clickable button for toggling the menu
88
112
  // Remove the gradient and set the same inset shadow as the :active state
89
113
  .btn-group.open .dropdown-toggle {
90
- box-shadow:inset 0 3px 5px rgba(0,0,0,.125);
114
+ box-shadow:inset 0 3px 5px .hsla(@always-color-black-hsl, 0.125)[@result];
91
115
 
92
116
  // Show no shadow for `.btn-link` since it has no other button styles.
93
117
  &.btn-link {
@@ -1,27 +1,8 @@
1
- @btn-primary-color: @color-white;
2
- @btn-primary-bg: @brand-primary;
3
- @btn-primary-border: darken(@btn-primary-bg, 5%);
4
- @btn-secondary-color: @color-white;
5
- @btn-secondary-bg: @brand-secondary;
6
- @btn-secondary-border: darken(@btn-secondary-bg, 5%);
7
- @btn-default-color: @btn-primary-bg;
8
- @btn-default-bg: @color-white;
9
- @btn-default-border: @btn-primary-border;
10
- @btn-success-color: @color-white;
11
- @btn-success-bg: @brand-success;
12
- @btn-success-border: darken(@btn-success-bg, 5%);
13
- @btn-warning-color: @color-white;
14
- @btn-warning-bg: @brand-warning;
15
- @btn-warning-border: darken(@btn-warning-bg, 5%);
16
- @btn-danger-color: @color-white;
17
- @btn-danger-bg: @brand-danger;
18
- @btn-danger-border: darken(@btn-danger-bg, 5%);
19
- @btn-info-color: @color-white;
20
- @btn-info-bg: @brand-info;
21
- @btn-info-border: darken(@btn-info-bg, 5%);
22
- @btn-link-disabled-color: @gray-light;
23
- @btn-muted-color: @gray;
24
- @btn-muted-active-color: @gray-dark;
1
+
2
+ @btn-link-disabled-color: var(--gray-light);
3
+ @btn-muted-color: var(--gray);
4
+ @btn-muted-active-color: var(--gray-dark);
5
+ @btn-toggled-shadow: inset 0 1px 5px 1px fade(@always-color-black, 25%);
25
6
 
26
7
  // right order is important
27
8
  .rio-btn(@btn-size-default; ~'');
@@ -65,11 +46,7 @@
65
46
  }
66
47
 
67
48
  &.btn-toggle.active {
68
- box-shadow: inset 0 1px 5px 1px rgb(90 101 102 / 50%);
69
-
70
- &.btn-primary {
71
- box-shadow: inset 0 1px 5px 1px rgb(90 101 102 / 70%);
72
- }
49
+ box-shadow: @btn-toggled-shadow;
73
50
  }
74
51
 
75
52
  &-toolbar {
@@ -84,8 +61,8 @@
84
61
  }
85
62
  }
86
63
 
87
- .btn + .dropdown-toggle,
88
- .btn-group > .btn:not(:first-child) {
64
+ //.btn + .dropdown-toggle,
65
+ .btn-group > .btn:not(:first-child):not(.dropdown-toggle) {
89
66
  margin-left: -1px !important;
90
67
  }
91
68
  }
@@ -107,15 +84,15 @@
107
84
  .caret {
108
85
  align-self: center;
109
86
  position: relative;
110
- border-color: @btn-primary-color;
87
+ border-color: var(--brand-primary);
111
88
  }
112
89
 
113
90
  &.btn-default {
114
91
  .caret {
115
- border-color: @brand-primary;
92
+ border-color: var(--brand-primary);
116
93
 
117
94
  .open & {
118
- border-color: @color-white;
95
+ border-color: @always-color-white;
119
96
  }
120
97
  }
121
98
 
@@ -126,7 +103,7 @@
126
103
  &:active:focus,
127
104
  &.active:focus {
128
105
  .caret {
129
- border-color: @color-white;
106
+ border-color: @always-color-white;
130
107
  }
131
108
  }
132
109
  }
@@ -222,10 +199,10 @@
222
199
 
223
200
  // custom overwrite
224
201
  &.btn-default:hover {
225
- color: @brand-primary;
202
+ color: var(--brand-primary);
226
203
 
227
204
  > .rioglyph {
228
- color: @brand-primary;
205
+ color: var(--brand-primary);
229
206
  }
230
207
  }
231
208
 
@@ -257,7 +234,7 @@
257
234
  box-shadow: none;
258
235
 
259
236
  > .rioglyph {
260
- color: @color-highlight-dark;
237
+ color: var(--color-highlight-dark);
261
238
  }
262
239
 
263
240
  // primary
@@ -309,7 +286,7 @@
309
286
  animation-iteration-count: infinite;
310
287
  animation-timing-function: linear;
311
288
  content: "\e9c7";
312
- color: @brand-primary;
289
+ color: var(--brand-primary);
313
290
  font-size: 20px;
314
291
  }
315
292
 
@@ -320,7 +297,7 @@
320
297
  &:not(.btn-default),
321
298
  &:focus {
322
299
  &:before {
323
- color: @color-white;
300
+ color: var(--color-white);
324
301
  }
325
302
  }
326
303
 
@@ -369,120 +346,87 @@
369
346
  }
370
347
  }
371
348
 
372
- &.btn-dynamic {
373
- font-size: inherit !important;
374
- line-height: inherit !important;
375
- padding: 10px 20px !important;
376
- height: auto !important;
377
- text-transform: none !important;
378
-
379
- &.btn-black {
380
- .button-variant(
381
- ~'!important';
382
- @color-black;
383
- lighten(@color-black, 5%);
384
- @color-white;
385
- lighten(@color-black, 10%)
386
- );
387
- }
388
-
389
- &.btn-white {
390
- .button-variant(
391
- ~'!important';
392
- @color-white;
393
- darken(@color-white, 5%);
394
- @color-black;
395
- darken(@color-white, 3%)
396
- );
397
- }
398
- }
399
-
400
349
  // btn variants
401
350
  &.btn-default {
402
- .button-variant(
351
+ .button-style(
403
352
  ~'';
404
- @btn-default-bg;
405
- @btn-default-border;
406
- @btn-default-color;
407
- @btn-default-color;
408
- @btn-default-color;
409
- @btn-default-color;
410
- darken(@btn-default-color, 17%);
411
- darken(@btn-default-border, 12%);
412
- darken(@btn-default-border, 12%);
413
- darken(@btn-default-border, 25%);
414
- darken(@btn-default-border, 25%);
415
- @btn-default-bg;
416
- @btn-default-bg;
417
- @btn-default-bg;
418
- @btn-default-bg;
353
+ var(--brand-primary);
354
+ @color-white-hsl;
355
+ @brand-primary-hsl;
356
+
357
+ var(--brand-primary);
358
+ .hslb(@brand-primary-hsl, '-', @btn-active-brightness)[@result];
359
+
360
+ var(--brand-primary);
361
+ .hslb(@brand-primary-hsl, '-', @btn-active-border-brightness)[@result];
362
+
363
+ var(--color-white);
364
+ var(--color-white);
419
365
  );
420
366
  }
421
367
 
422
368
  &.btn-primary {
423
- .button-variant(
369
+ .button-style(
424
370
  ~'';
425
- @btn-primary-bg;
426
- @btn-primary-border;
427
- @btn-primary-color;
371
+ var(--color-white);
372
+ @brand-primary-hsl;
428
373
  );
429
374
  }
430
375
 
431
376
  &.btn-secondary {
432
- .button-variant(
377
+ .button-style(
433
378
  ~'';
434
- @btn-secondary-bg;
435
- @btn-secondary-border;
436
- @btn-secondary-color;
379
+ var(--color-white);
380
+ @brand-secondary-hsl;
437
381
  );
438
382
  }
439
383
 
440
384
  &.btn-success {
441
- .button-variant(
385
+ .button-style(
442
386
  ~'';
443
- @btn-success-bg;
444
- @btn-success-border;
445
- @btn-success-color;
387
+ var(--color-white);
388
+ @brand-success-hsl;
446
389
  );
447
390
  }
448
391
 
449
392
  &.btn-info {
450
- .button-variant(
393
+ .button-style(
451
394
  ~'';
452
- @btn-info-bg;
453
- @btn-info-border;
454
- @btn-info-color;
395
+ var(--color-white);
396
+ @brand-info-hsl;
455
397
  );
456
398
  }
457
399
 
458
400
  &.btn-warning {
459
- .button-variant(
401
+ .button-style(
460
402
  ~'';
461
- @btn-warning-bg;
462
- @btn-warning-border;
463
- @btn-warning-color;
403
+ var(--color-white);
404
+ @brand-warning-hsl;
464
405
  );
465
406
  }
466
407
 
467
408
  &.btn-danger {
468
- .button-variant(
409
+ .button-style(
469
410
  ~'';
470
- @btn-danger-bg;
471
- @btn-danger-border;
472
- @btn-danger-color;
411
+ var(--color-white);
412
+ @brand-danger-hsl;
473
413
  );
474
414
  }
475
415
  }
476
416
 
477
417
  .btn-ripple {
478
418
  animation: ripple 600ms linear;
479
- background-color: fade(@color-white, 70%);
480
419
  border-radius: 50%;
481
420
  position: absolute;
482
421
  transform: scale(0);
483
422
  z-index: 1;
484
423
  pointer-events: none;
485
424
 
425
+ // light and darkmode
426
+ background-color: .hsla(@always-color-white-hsl, 0.5)[@result];
427
+ [data-theme="dark"] & { background-color: .hsla(@always-color-white-hsl, 0.25)[@result] }
428
+ // @media (prefers-color-scheme: dark) { html:not([data-theme]) & { background-color: .hsla(@always-color-white-hsl, 0.25)[@result] } }
429
+
486
430
  // fix double ripple effect on mobile
487
431
  &:not([style*="left"]):not([style*="top"]) {
488
432
  display: none;
@@ -1,7 +1,7 @@
1
1
  .callout {
2
- background-color: @color-white;
2
+ background-color: var(--color-white);
3
3
  border-radius: @border-radius-default;
4
- border: 1px solid @gray-light;
4
+ border: 1px solid var(--gray-light);
5
5
  padding: 20px 20px 20px 25px;
6
6
 
7
7
  p:last-child {
@@ -16,7 +16,7 @@
16
16
  // warning
17
17
  // danger
18
18
  &-default {
19
- box-shadow: inset 5px 0 0 0 @gray;
19
+ box-shadow: inset 5px 0 0 0 var(--gray);
20
20
  }
21
21
 
22
22
  each(@colors-brand-and-status-map, {
@@ -1,5 +1,3 @@
1
- @code-bg: #f3f3f4;
2
-
3
1
  code,
4
2
  pre {
5
3
  font-family: @font-family-monospace;
@@ -7,8 +5,8 @@ pre {
7
5
  }
8
6
 
9
7
  code {
10
- background-color: @code-bg;
11
- color: @color-warmup-raspberry;
8
+ background-color: var(--color-code);
9
+ color: var(--brand-secondary);
12
10
  font-size: 80%;
13
11
  margin-left: 1px;
14
12
  margin-right: 1px;
@@ -29,8 +27,8 @@ code {
29
27
  }
30
28
 
31
29
  pre {
32
- background-color: @code-bg;
33
- color: @gray-dark;
30
+ background-color: var(--color-code);
31
+ color: var(--gray-dark);
34
32
  display: block;
35
33
  margin: 0;
36
34
  padding: 5px 10px;
@@ -1,21 +1,21 @@
1
- .bg-muted, .hover-bg-muted:hover { background-color: @gray-lighter !important }
2
- .bg-default, .hover-bg-default:hover { background-color: @gray-dark !important }
1
+ .bg-muted, .hover-bg-muted:hover { background-color: var(--gray-lighter) !important }
2
+ .bg-default, .hover-bg-default:hover { background-color: var(--gray-dark) !important }
3
3
 
4
4
  // white
5
5
  // black
6
- .bg-white, .hover-bg-white:hover { background-color: @color-white !important }
7
- .fill-white { fill: @color-white !important }
6
+ .bg-white, .hover-bg-white:hover { background-color: var(--color-white) !important }
7
+ .fill-white { fill: var(--color-white) !important }
8
8
 
9
- .bg-black, .hover-bg-black:hover { background-color: @color-black !important }
10
- .fill-black { fill: @color-black !important }
11
- .bg-black { color: @color-white !important }
9
+ .bg-black, .hover-bg-black:hover { background-color: var(--color-black) !important }
10
+ .fill-black { fill: var(--color-black) !important }
11
+ .bg-black { color: var(--color-white) !important }
12
12
 
13
13
 
14
14
  // primary
15
15
  // secondary
16
16
  each(@colors-brand-map, {
17
17
  .bg-@{key} {
18
- color: @color-white !important;
18
+ color: var(--color-white) !important;
19
19
  background-color: @value !important;
20
20
  }
21
21
  .hover-bg-@{key}:hover {
@@ -32,7 +32,7 @@ each(@colors-brand-map, {
32
32
  // danger
33
33
  each(@colors-status-map, {
34
34
  .bg-@{key} {
35
- color: @color-white !important;
35
+ color: var(--color-white) !important;
36
36
  background-color: @value !important;
37
37
  }
38
38
  .hover-bg-@{key}:hover {
@@ -52,7 +52,7 @@ each(@colors-status-map, {
52
52
  // lightest
53
53
  each(@colors-gray-map, {
54
54
  .bg-@{key} {
55
- color: @gray-darkest !important;
55
+ color: var(--gray-darkest) !important;
56
56
  background-color: @value !important;
57
57
  }
58
58
  .hover-bg-@{key}:hover {
@@ -64,7 +64,7 @@ each(@colors-gray-map, {
64
64
  })
65
65
  .bg-dark,
66
66
  .bg-darker,
67
- .bg-darkest { color: @color-white !important }
67
+ .bg-darkest { color: var(--color-white) !important }
68
68
 
69
69
  // map-marker-asset
70
70
  // map-marker-poi
@@ -72,7 +72,7 @@ each(@colors-gray-map, {
72
72
  // map-marker-route
73
73
  each(@colors-map-marker-map, {
74
74
  .bg-@{key} {
75
- color: @color-white !important;
75
+ color: var(--color-white) !important;
76
76
  background-color: @value !important;
77
77
  }
78
78
  .hover-bg-@{key}:hover {
@@ -90,7 +90,7 @@ each(@colors-map-marker-map, {
90
90
  // rating-5
91
91
  each(@colors-rating-map, {
92
92
  .bg-@{key} {
93
- color: @color-white !important;
93
+ color: var(--color-white) !important;
94
94
  background-color: @value !important;
95
95
  }
96
96
  .hover-bg-@{key}:hover {
@@ -107,7 +107,7 @@ each(@colors-rating-map, {
107
107
  // status-working
108
108
  each(@colors-driving-status-map, {
109
109
  .bg-@{key} {
110
- color: @color-white !important;
110
+ color: var(--color-white) !important;
111
111
  background-color: @value !important;
112
112
  }
113
113
  .hover-bg-@{key}:hover {
@@ -128,7 +128,7 @@ each(@colors-driving-status-map, {
128
128
  // highlight-decent
129
129
  each(@colors-highlight-map, {
130
130
  .bg-@{key} {
131
- color: @gray-darkest !important;
131
+ color: var(--gray-darkest) !important;
132
132
  background-color: @value !important;
133
133
  }
134
134
  .hover-bg-@{key}:hover {
@@ -141,7 +141,7 @@ each(@colors-highlight-map, {
141
141
  .bg-highlight,
142
142
  .bg-highlight-dark,
143
143
  .bg-highlight-darker,
144
- .bg-highlight-darkest { color: @color-white !important }
144
+ .bg-highlight-darkest { color: var(--color-white) !important }
145
145
 
146
146
  // coldplay-wine
147
147
  // coldplay-aubergine
@@ -155,7 +155,7 @@ each(@colors-highlight-map, {
155
155
  & when (@buildColdplayColors = true) {
156
156
  each(@colors-coldplay-map, {
157
157
  .bg-@{key} {
158
- color: @gray-darkest !important;
158
+ color: var(--gray-darkest) !important;
159
159
  background-color: @value !important;
160
160
  }
161
161
  .hover-bg-@{key}:hover {
@@ -168,7 +168,7 @@ each(@colors-highlight-map, {
168
168
  .bg-coldplay-wine,
169
169
  .bg-coldplay-aubergine,
170
170
  .bg-coldplay-kashmir,
171
- .bg-coldplay-fountain { color: @color-white !important }
171
+ .bg-coldplay-fountain { color: var(--color-white) !important }
172
172
  }
173
173
 
174
174
  // warmup-crimson
@@ -183,7 +183,7 @@ each(@colors-highlight-map, {
183
183
  & when (@buildWarmupColors = true) {
184
184
  each(@colors-warmup-map, {
185
185
  .bg-@{key} {
186
- color: @gray-darkest !important;
186
+ color: var(--gray-darkest) !important;
187
187
  background-color: @value !important;
188
188
  }
189
189
  .hover-bg-@{key}:hover {
@@ -198,5 +198,5 @@ each(@colors-highlight-map, {
198
198
  .bg-warmup-cadillac,
199
199
  .bg-warmup-raspberry,
200
200
  .bg-warmup-cerise,
201
- .bg-warmup-charm { color: @color-white !important }
201
+ .bg-warmup-charm { color: var(--color-white) !important }
202
202
  }
@@ -1,4 +1,4 @@
1
- @input-group-addon-bg: @color-white;
1
+ @input-group-addon-bg: var(--color-white);
2
2
  @input-group-addon-border-color: @input-border;
3
3
 
4
4
  .input-group {
@@ -32,7 +32,7 @@
32
32
  align-items: center;
33
33
  background-color: @input-group-addon-bg;
34
34
  border: 1px solid @input-group-addon-border-color;
35
- color: @gray-dark;
35
+ color: var(--gray-dark);
36
36
  display: flex;
37
37
  justify-content: center;
38
38
  width: auto;
@@ -47,7 +47,7 @@
47
47
 
48
48
  &.input-group-addon-label {
49
49
  text-transform: uppercase;
50
- background-color: @gray-lightest;
50
+ background-color: var(--gray-lightest);
51
51
  }
52
52
 
53
53
  &:first-child {
@@ -107,7 +107,7 @@
107
107
  }
108
108
 
109
109
  > .rioglyph {
110
- color: lighten(@gray-dark, 5%);
110
+ color: .hslb(@gray-dark-hsl, '+', '5%')[@result];
111
111
  font-size: 18px;
112
112
  }
113
113
  }