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

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 (209) hide show
  1. package/ColorScheme.d.ts +4 -0
  2. package/ColorScheme.js +2 -0
  3. package/Colors.js +1 -1
  4. package/components/charts/chartHelper.js +1 -1
  5. package/components/mapMarker/ClusterMapMarker.js +2 -2
  6. package/components/mapMarker/SingleMapMarker.js +2 -2
  7. package/components/sidebars/Sidebar.js +1 -1
  8. package/hooks/useScrollPosition.js +72 -0
  9. package/index.js +4 -1
  10. package/lib/es/ColorScheme.d.ts +4 -0
  11. package/lib/es/ColorScheme.js +18 -0
  12. package/lib/es/Colors.js +1 -1
  13. package/lib/es/components/charts/chartHelper.js +1 -1
  14. package/lib/es/components/mapMarker/ClusterMapMarker.js +2 -2
  15. package/lib/es/components/mapMarker/SingleMapMarker.js +2 -2
  16. package/lib/es/components/sidebars/Sidebar.js +1 -1
  17. package/lib/es/hooks/useScrollPosition.js +80 -0
  18. package/lib/es/index.js +24 -1
  19. package/lib/es/styles/components/Activity.less +9 -10
  20. package/lib/es/styles/components/ApplicationHeader.less +24 -29
  21. package/lib/es/styles/components/ApplicationLayout.less +7 -7
  22. package/lib/es/styles/components/AssetTree.less +30 -28
  23. package/lib/es/styles/components/AutoSuggest.less +2 -2
  24. package/lib/es/styles/components/BottomSheet.less +1 -2
  25. package/lib/es/styles/components/Carousel.less +13 -9
  26. package/lib/es/styles/components/Checkbox.less +15 -16
  27. package/lib/es/styles/components/ClearableInput.less +3 -3
  28. package/lib/es/styles/components/Counter.less +12 -12
  29. package/lib/es/styles/components/DataTabs.less +2 -2
  30. package/lib/es/styles/components/DatePicker.less +27 -27
  31. package/lib/es/styles/components/Dialog.less +15 -11
  32. package/lib/es/styles/components/Dropdown.less +11 -11
  33. package/lib/es/styles/components/Expander.less +7 -7
  34. package/lib/es/styles/components/ListMenu.less +8 -8
  35. package/lib/es/styles/components/MapHere.less +3 -2
  36. package/lib/es/styles/components/MapMarker.less +16 -17
  37. package/lib/es/styles/components/MapSettings.less +5 -5
  38. package/lib/es/styles/components/NoData.less +1 -1
  39. package/lib/es/styles/components/Notification.less +12 -12
  40. package/lib/es/styles/components/RadioButton.less +11 -12
  41. package/lib/es/styles/components/Resizer.less +1 -1
  42. package/lib/es/styles/components/Select.less +16 -26
  43. package/lib/es/styles/components/Sidebar.less +29 -21
  44. package/lib/es/styles/components/Slider.less +18 -18
  45. package/lib/es/styles/components/Spinner.less +6 -6
  46. package/lib/es/styles/components/StatsWidget.less +5 -5
  47. package/lib/es/styles/components/SteppedProgressBar.less +32 -29
  48. package/lib/es/styles/components/SupportMarker.less +1 -1
  49. package/lib/es/styles/components/Switch.less +8 -8
  50. package/lib/es/styles/components/TableSettingsDialog.less +7 -7
  51. package/lib/es/styles/components/TableToolbar.less +1 -1
  52. package/lib/es/styles/components/Tag.less +10 -10
  53. package/lib/es/styles/components/Timeline.less +3 -3
  54. package/lib/es/styles/components/Tooltip.less +10 -10
  55. package/lib/es/styles/design/badges.less +10 -10
  56. package/lib/es/styles/design/border.less +1 -1
  57. package/lib/es/styles/design/breadcrumbs.less +2 -2
  58. package/lib/es/styles/design/button-groups.less +25 -1
  59. package/lib/es/styles/design/buttons.less +53 -109
  60. package/lib/es/styles/design/callouts.less +3 -3
  61. package/lib/es/styles/design/code.less +4 -6
  62. package/lib/es/styles/design/colors.less +20 -20
  63. package/lib/es/styles/design/form-input-groups.less +4 -4
  64. package/lib/es/styles/design/form-inputs.less +33 -31
  65. package/lib/es/styles/design/images.less +2 -2
  66. package/lib/es/styles/design/labels.less +11 -11
  67. package/lib/es/styles/design/list-group.less +14 -12
  68. package/lib/es/styles/design/navs.less +27 -27
  69. package/lib/es/styles/design/normalize.less +0 -9
  70. package/lib/es/styles/design/pagination.less +10 -10
  71. package/lib/es/styles/design/panels.less +10 -10
  72. package/lib/es/styles/design/popovers.less +8 -8
  73. package/lib/es/styles/design/progress-bars.less +8 -8
  74. package/lib/es/styles/design/shadows.less +14 -7
  75. package/lib/es/styles/design/tables.less +68 -106
  76. package/lib/es/styles/design/text.less +5 -19
  77. package/lib/es/styles/design/theme.less +10 -10
  78. package/lib/es/styles/design/thumbnails.less +2 -2
  79. package/lib/es/styles/design/type.less +4 -4
  80. package/lib/es/styles/design/wells.less +1 -1
  81. package/lib/es/styles/mapping/color-map.less +65 -64
  82. package/lib/es/styles/mixins/_imports.less +14 -0
  83. package/lib/es/styles/mixins/buttons.less +24 -56
  84. package/lib/es/styles/mixins/forms.less +19 -55
  85. package/lib/es/styles/mixins/hsl.less +19 -0
  86. package/lib/es/styles/mixins/panels.less +2 -2
  87. package/lib/es/styles/print/print.less +7 -7
  88. package/lib/es/styles/rio-uikit-core.less +2 -2
  89. package/lib/es/styles/rio-uikit-print-utilities.less +2 -2
  90. package/lib/es/styles/rio-uikit-responsive-utilities.less +2 -2
  91. package/lib/es/styles/variables/_index.less +196 -0
  92. package/lib/es/styles/variables/colors.json +67 -0
  93. package/lib/es/styles/variables/concated_css_variables.less +66 -0
  94. package/lib/es/styles/variables/dark_colors.less +88 -0
  95. package/lib/es/styles/variables/dark_css_variables.less +28 -0
  96. package/lib/es/styles/variables/dark_css_variables_map.less +96 -0
  97. package/lib/es/styles/variables/light_colors.less +92 -0
  98. package/lib/es/styles/variables/light_css_variables.less +17 -0
  99. package/lib/es/styles/variables/light_css_variables_map.less +100 -0
  100. package/lib/es/styles/variables/screens.less +7 -0
  101. package/lib/es/styles/variables/text.less +23 -0
  102. package/lib/es/themes/BuyButton/styles/rio-buyButton.less +13 -8
  103. package/lib/es/themes/MAN/styles/man-uikit.less +3 -0
  104. package/lib/es/themes/SCANIA/styles/scania-uikit.less +3 -0
  105. package/lib/es/themes/Volkswagen/styles/vw-uikit.less +21 -30
  106. package/lib/es/themes/Website/styles/rio-website.less +145 -120
  107. package/lib/es/themes/Xmas/styles/rio-xmas.less +59 -29
  108. package/lib/es/types.ts +4 -0
  109. package/lib/es/useScrollPosition.d.ts +4 -0
  110. package/lib/es/useScrollPosition.js +13 -0
  111. package/lib/es/utils/colorScheme.js +57 -0
  112. package/lib/es/utils/init.js +2 -0
  113. package/lib/es/version.json +1 -1
  114. package/package.json +4 -3
  115. package/styles/components/Activity.less +9 -10
  116. package/styles/components/ApplicationHeader.less +24 -29
  117. package/styles/components/ApplicationLayout.less +7 -7
  118. package/styles/components/AssetTree.less +30 -28
  119. package/styles/components/AutoSuggest.less +2 -2
  120. package/styles/components/BottomSheet.less +1 -2
  121. package/styles/components/Carousel.less +13 -9
  122. package/styles/components/Checkbox.less +15 -16
  123. package/styles/components/ClearableInput.less +3 -3
  124. package/styles/components/Counter.less +12 -12
  125. package/styles/components/DataTabs.less +2 -2
  126. package/styles/components/DatePicker.less +27 -27
  127. package/styles/components/Dialog.less +15 -11
  128. package/styles/components/Dropdown.less +11 -11
  129. package/styles/components/Expander.less +7 -7
  130. package/styles/components/ListMenu.less +8 -8
  131. package/styles/components/MapHere.less +3 -2
  132. package/styles/components/MapMarker.less +16 -17
  133. package/styles/components/MapSettings.less +5 -5
  134. package/styles/components/NoData.less +1 -1
  135. package/styles/components/Notification.less +12 -12
  136. package/styles/components/RadioButton.less +11 -12
  137. package/styles/components/Resizer.less +1 -1
  138. package/styles/components/Select.less +16 -26
  139. package/styles/components/Sidebar.less +29 -21
  140. package/styles/components/Slider.less +18 -18
  141. package/styles/components/Spinner.less +6 -6
  142. package/styles/components/StatsWidget.less +5 -5
  143. package/styles/components/SteppedProgressBar.less +32 -29
  144. package/styles/components/SupportMarker.less +1 -1
  145. package/styles/components/Switch.less +8 -8
  146. package/styles/components/TableSettingsDialog.less +7 -7
  147. package/styles/components/TableToolbar.less +1 -1
  148. package/styles/components/Tag.less +10 -10
  149. package/styles/components/Timeline.less +3 -3
  150. package/styles/components/Tooltip.less +10 -10
  151. package/styles/design/badges.less +10 -10
  152. package/styles/design/border.less +1 -1
  153. package/styles/design/breadcrumbs.less +2 -2
  154. package/styles/design/button-groups.less +25 -1
  155. package/styles/design/buttons.less +53 -109
  156. package/styles/design/callouts.less +3 -3
  157. package/styles/design/code.less +4 -6
  158. package/styles/design/colors.less +20 -20
  159. package/styles/design/form-input-groups.less +4 -4
  160. package/styles/design/form-inputs.less +33 -31
  161. package/styles/design/images.less +2 -2
  162. package/styles/design/labels.less +11 -11
  163. package/styles/design/list-group.less +14 -12
  164. package/styles/design/navs.less +27 -27
  165. package/styles/design/normalize.less +0 -9
  166. package/styles/design/pagination.less +10 -10
  167. package/styles/design/panels.less +10 -10
  168. package/styles/design/popovers.less +8 -8
  169. package/styles/design/progress-bars.less +8 -8
  170. package/styles/design/shadows.less +14 -7
  171. package/styles/design/tables.less +68 -106
  172. package/styles/design/text.less +5 -19
  173. package/styles/design/theme.less +10 -10
  174. package/styles/design/thumbnails.less +2 -2
  175. package/styles/design/type.less +4 -4
  176. package/styles/design/wells.less +1 -1
  177. package/styles/mapping/color-map.less +65 -64
  178. package/styles/mixins/_imports.less +14 -0
  179. package/styles/mixins/buttons.less +24 -56
  180. package/styles/mixins/forms.less +19 -55
  181. package/styles/mixins/hsl.less +19 -0
  182. package/styles/mixins/panels.less +2 -2
  183. package/styles/print/print.less +7 -7
  184. package/styles/rio-uikit-core.less +2 -2
  185. package/styles/rio-uikit-print-utilities.less +2 -2
  186. package/styles/rio-uikit-responsive-utilities.less +2 -2
  187. package/styles/variables/_index.less +196 -0
  188. package/styles/variables/colors.json +67 -0
  189. package/styles/variables/concated_css_variables.less +66 -0
  190. package/styles/variables/dark_colors.less +88 -0
  191. package/styles/variables/dark_css_variables.less +28 -0
  192. package/styles/variables/dark_css_variables_map.less +96 -0
  193. package/styles/variables/light_colors.less +92 -0
  194. package/styles/variables/light_css_variables.less +17 -0
  195. package/styles/variables/light_css_variables_map.less +100 -0
  196. package/styles/variables/screens.less +7 -0
  197. package/styles/variables/text.less +23 -0
  198. package/themes/BuyButton/styles/rio-buyButton.less +13 -8
  199. package/themes/MAN/styles/man-uikit.less +3 -0
  200. package/themes/SCANIA/styles/scania-uikit.less +3 -0
  201. package/themes/Volkswagen/styles/vw-uikit.less +21 -30
  202. package/themes/Website/styles/rio-website.less +145 -120
  203. package/themes/Xmas/styles/rio-xmas.less +59 -29
  204. package/types.ts +4 -0
  205. package/useScrollPosition.d.ts +4 -0
  206. package/useScrollPosition.js +2 -0
  207. package/utils/colorScheme.js +48 -0
  208. package/utils/init.js +2 -0
  209. package/version.json +1 -1
@@ -20,8 +20,8 @@
20
20
  }
21
21
 
22
22
  .table-settings-item {
23
- background: @color-white;
24
- border: 1px solid @gray-light;
23
+ background: var(--color-white);
24
+ border: 1px solid var(--gray-light);
25
25
  position: relative;
26
26
  transition: background-color 0.2s ease-in-out ~','box-shadow 0.2s ease-in-out;
27
27
  z-index: 1;
@@ -32,7 +32,7 @@
32
32
  padding: 0 8px;
33
33
 
34
34
  &:hover {
35
- background-color: @color-highlight-decent;
35
+ background-color: var(--color-highlight-decent);
36
36
  }
37
37
  }
38
38
 
@@ -40,7 +40,7 @@
40
40
  align-items: center;
41
41
  display: flex;
42
42
  padding: 10px;
43
- border-top: 1px solid @gray-light;
43
+ border-top: 1px solid var(--gray-light);
44
44
  }
45
45
 
46
46
  &:not(:last-child) {
@@ -63,14 +63,14 @@
63
63
  }
64
64
 
65
65
  &.movedColumn {
66
- background-color: @color-highlight-decent;
66
+ background-color: var(--color-highlight-decent);
67
67
  }
68
68
 
69
69
  .table-settings-item-label {
70
70
  .ellipsis-1;
71
71
  cursor: grab;
72
72
  align-items: center;
73
- color: @gray-dark;
73
+ color: var(--gray-dark);
74
74
  display: flex;
75
75
  flex: 1 0;
76
76
  font-weight: @font-normal;
@@ -83,7 +83,7 @@
83
83
  }
84
84
 
85
85
  .column-width-label {
86
- color: @gray;
86
+ color: var(--gray);
87
87
  margin-right: 5px;
88
88
  }
89
89
 
@@ -67,7 +67,7 @@
67
67
  padding-right: 18px;
68
68
 
69
69
  &:after {
70
- background: @gray-light;
70
+ background: var(--gray-light);
71
71
  bottom: 5px;
72
72
  content: '';
73
73
  height: @input-height-base - 10px;
@@ -1,11 +1,11 @@
1
1
  .tag {
2
- background: @color-white;
2
+ background: var(--color-white);
3
3
  font-size: 14px;
4
4
  font-weight: @font-normal;
5
5
  line-height: @btn-size-sm * 0.6;
6
6
  border-radius: 2px;
7
- border: 1px solid @gray-light;
8
- color: @gray-dark;
7
+ border: 1px solid var(--gray-light);
8
+ color: var(--gray-dark);
9
9
  border-radius: @btn-size-sm;
10
10
  position: relative;
11
11
  display: inline-flex;
@@ -21,8 +21,8 @@
21
21
  }
22
22
 
23
23
  &.tag-muted {
24
- border-color: @gray-lightest;
25
- background-color: @gray-lightest;
24
+ border-color: var(--gray-lightest);
25
+ background-color: var(--gray-lightest);
26
26
  }
27
27
 
28
28
  &[style*="width"],
@@ -51,8 +51,8 @@
51
51
  }
52
52
 
53
53
  &.disabled {
54
- border-color: @gray;
55
- background-color: @gray-light;
54
+ border-color: var(--gray);
55
+ background-color: var(--gray-light);
56
56
  opacity: .5;
57
57
  position: relative;
58
58
 
@@ -75,17 +75,17 @@
75
75
  cursor: pointer;
76
76
 
77
77
  &:hover {
78
- background-color: @gray-lightest;
78
+ background-color: var(--gray-lightest);
79
79
  }
80
80
  }
81
81
 
82
82
  &.active {
83
- background-color: fade(@brand-primary, 20%);
83
+ background-color: .hsla(@brand-primary-hsl, 0.2)[@result];
84
84
  border-color: @brand-primary;
85
85
  color: @brand-primary;
86
86
 
87
87
  &:hover {
88
- background-color: fade(@brand-primary, 30%);
88
+ background-color: .hsla(@brand-primary-hsl, 0.3)[@result];
89
89
  }
90
90
  }
91
91
 
@@ -1,7 +1,7 @@
1
1
  .timeline {
2
2
  .timeline-date {
3
3
  position: relative;
4
- color: @gray-dark;
4
+ color: var(--gray-dark);
5
5
  }
6
6
 
7
7
  .timeline-content {
@@ -23,7 +23,7 @@
23
23
  white-space: nowrap;
24
24
 
25
25
  &:before {
26
- background: @gray-light;
26
+ background: var(--gray-light);
27
27
  bottom: 5px;
28
28
  content: "";
29
29
  left: 50%;
@@ -51,7 +51,7 @@
51
51
  padding-top: 60px;
52
52
 
53
53
  &:before {
54
- background: @gray-light;
54
+ background: var(--gray-light);
55
55
  top: 20px;
56
56
  content: "";
57
57
  left: 50%;
@@ -1,6 +1,6 @@
1
1
  @tooltip-max-width: 200px;
2
- @tooltip-color: @color-white;
3
- @tooltip-bg: @gray-darker;
2
+ @tooltip-color: var(--color-white);
3
+ @tooltip-bg: var(--gray-darker);
4
4
  @tooltip-arrow-width: 5px;
5
5
  @tooltip-arrow-color: @tooltip-bg;
6
6
  @tooltip-opacity: 1;
@@ -48,7 +48,7 @@
48
48
  z-index: @zindex-tooltip;
49
49
 
50
50
  .tooltip-inner {
51
- background: @gray-darkest;
51
+ background: var(--gray-darkest);
52
52
  border-radius: @border-radius-sm;
53
53
  padding: 5px 10px;
54
54
  width: 180px;
@@ -67,13 +67,13 @@
67
67
  @arrow-size-hypotenuse: sqrt(pow(@arrow-size, 2) + pow(@arrow-size, 2));
68
68
 
69
69
  .tooltip-mixin(
70
- @offset: 10px; @overlap: 10px; @color: @gray-darkest; @arrow-size: 5px; @arrow-size-hypotenuse:
70
+ @offset: 10px; @overlap: 10px; @color: var(--gray-darkest); @arrow-size: 5px; @arrow-size-hypotenuse:
71
71
  @arrow-size-hypotenuse;
72
72
  );
73
73
  }
74
74
 
75
75
  &.tooltip-onboarding {
76
- filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.3));
76
+ filter: drop-shadow(0 0 10px .hsla(@always-color-black-hsl, 0.3)[@result]);
77
77
  z-index: @zindex-tooltip-onboarding;
78
78
 
79
79
  &.onboarding-clickflow {
@@ -81,7 +81,7 @@
81
81
 
82
82
  &.onboarding-clickflow-backdrop {
83
83
  &:after {
84
- background-color: rgba(0, 0, 0, 0.3);
84
+ background-color: .hsla(@always-color-black-hsl, 0.3)[@result];
85
85
  bottom: -1500px;
86
86
  content: "";
87
87
  display: block;
@@ -106,7 +106,7 @@
106
106
  }
107
107
 
108
108
  .tooltip-inner {
109
- background: @brand-secondary;
109
+ background: var(--brand-secondary);
110
110
  border-radius: @border-radius-default;
111
111
  padding: 15px;
112
112
  width: 330px;
@@ -124,13 +124,13 @@
124
124
  }
125
125
 
126
126
  .tooltip-close {
127
- color: darken(@brand-secondary, 10%);
127
+ color: .hslb(@brand-secondary-hsl, '-', '10%')[@result];
128
128
  cursor: pointer;
129
129
  font-size: 16px;
130
130
  margin: 2px 0 0 10px;
131
131
 
132
132
  &:hover {
133
- color: @color-white;
133
+ color: var(--color-white);
134
134
  }
135
135
  }
136
136
  }
@@ -139,7 +139,7 @@
139
139
  @arrow-size-hypotenuse: sqrt(pow(@arrow-size, 2) + pow(@arrow-size, 2));
140
140
 
141
141
  .tooltip-mixin(
142
- @offset: 20px; @overlap: 25px; @color: @color-map-marker-poi; @arrow-size: @arrow-size; @arrow-size-hypotenuse:
142
+ @offset: 20px; @overlap: 25px; @color: var(--color-map-marker-poi); @arrow-size: @arrow-size; @arrow-size-hypotenuse:
143
143
  @arrow-size-hypotenuse;
144
144
  );
145
145
  }
@@ -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;