@rio-cloud/rio-uikit 0.15.1 → 0.16.0-beta-1

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 (186) hide show
  1. package/README.md +46 -3
  2. package/lib/components/actionBarItem/ActionBarItem.js +4 -4
  3. package/lib/components/actionBarItem/ActionBarItemPopoverContent.js +43 -0
  4. package/lib/components/actionBarItem/ActionBarOverlay.js +8 -3
  5. package/lib/components/applicationHeader/AppMenuDropdown.js +9 -13
  6. package/lib/components/applicationLayout/ApplicationLayout.js +2 -0
  7. package/lib/components/applicationLayout/ApplicationLayoutBody.js +5 -3
  8. package/lib/components/assetTree/AssetTree.js +1 -1
  9. package/lib/components/assetTree/Tree.js +2 -2
  10. package/lib/components/assetTree/TreeLeaf.js +9 -9
  11. package/lib/components/bottomSheet/BottomSheet.js +11 -7
  12. package/lib/components/carousel/Carousel.js +7 -426
  13. package/lib/components/checkbox/Checkbox.js +4 -4
  14. package/lib/components/datepicker/DatePicker.js +15 -6
  15. package/lib/components/dropdown/ButtonDropdown.js +8 -11
  16. package/lib/components/listMenu/ListMenu.js +40 -23
  17. package/lib/components/numberInput/NumberInput.js +6 -6
  18. package/lib/components/onboarding/OnboardingTip.js +9 -9
  19. package/lib/components/states/NotBookedState.js +2 -2
  20. package/lib/components/table/TableSettingsDialogFooter.js +1 -1
  21. package/lib/components/teaser/Teaser.js +1 -1
  22. package/lib/components/teaser/TeaserContainer.js +8 -8
  23. package/lib/components/tooltip/Tooltip.js +4 -4
  24. package/lib/es/DeviceUtils.d.ts +4 -2
  25. package/lib/es/deviceUtils.js +12 -0
  26. package/lib/hooks/useClipboard.js +2 -2
  27. package/lib/style/css/_exports/man-uikit.less +7 -5
  28. package/lib/style/css/_exports/rio-buyButton.less +30 -41
  29. package/lib/style/css/_exports/rio-uikit-core.less +105 -127
  30. package/lib/style/css/_exports/rio-uikit-print-utilities.less +6 -11
  31. package/lib/style/css/_exports/rio-uikit-responsive-utilities.less +6 -11
  32. package/lib/style/css/_exports/rio-uikit.less +5 -4
  33. package/lib/style/css/_exports/rio-website.less +35 -13
  34. package/lib/style/css/_exports/vw-uikit.less +10 -8
  35. package/lib/style/css/animations/_imports.less +9 -0
  36. package/lib/style/css/animations/collapse.less +16 -0
  37. package/lib/style/css/animations/fade.less +28 -0
  38. package/lib/style/css/animations/pinging.less +7 -0
  39. package/lib/style/css/animations/rotate.less +52 -0
  40. package/lib/style/css/animations/scale.less +35 -0
  41. package/lib/style/css/animations/slide.less +39 -0
  42. package/lib/style/css/animations/spinning.less +4 -0
  43. package/lib/style/css/animations/transition.less +129 -0
  44. package/lib/style/css/animations/translate.less +28 -0
  45. package/lib/style/css/components/Activity.less +93 -0
  46. package/lib/style/css/components/ApplicationHeader.less +438 -0
  47. package/lib/style/css/components/ApplicationLayout.less +236 -0
  48. package/lib/style/css/components/AssetTree.less +443 -0
  49. package/lib/style/css/components/AutoSuggest.less +22 -0
  50. package/lib/style/css/components/BottomSheet.less +14 -0
  51. package/lib/style/css/components/Carousel.less +212 -0
  52. package/lib/style/css/components/Checkbox.less +224 -0
  53. package/lib/style/css/components/ClearableInput.less +115 -0
  54. package/lib/style/css/components/Counter.less +142 -0
  55. package/lib/style/css/components/DataTabs.less +100 -0
  56. package/lib/style/css/components/DatePicker.less +391 -0
  57. package/lib/style/css/components/Dialog.less +482 -0
  58. package/lib/style/css/components/Dropdown.less +186 -0
  59. package/lib/style/css/components/Expander.less +196 -0
  60. package/lib/style/css/components/FilePicker.less +8 -0
  61. package/lib/style/css/components/ListMenu.less +77 -0
  62. package/lib/style/css/components/MapHere.less +91 -0
  63. package/lib/style/css/components/MapMarker.less +347 -0
  64. package/lib/style/css/components/MapSettings.less +140 -0
  65. package/lib/style/css/components/NoData.less +8 -0
  66. package/lib/style/css/components/Notification.less +234 -0
  67. package/lib/style/css/components/RadioButton.less +173 -0
  68. package/lib/style/css/components/Resizer.less +43 -0
  69. package/lib/style/css/components/Select.less +274 -0
  70. package/lib/style/css/components/Sidebar.less +157 -0
  71. package/lib/style/css/components/Slider.less +278 -0
  72. package/lib/style/css/components/Spinner.less +49 -0
  73. package/lib/style/css/components/StatsWidget.less +111 -0
  74. package/lib/style/css/components/SteppedProgressBar.less +323 -0
  75. package/lib/style/css/components/SupportMarker.less +34 -0
  76. package/lib/style/css/components/Switch.less +145 -0
  77. package/lib/style/css/components/TableSettingsDialog.less +96 -0
  78. package/lib/style/css/components/TableSortArrows.less +54 -0
  79. package/lib/style/css/components/Tag.less +246 -0
  80. package/lib/style/css/components/TagManager.less +4 -0
  81. package/lib/style/css/components/Teaser.less +12 -0
  82. package/lib/style/css/components/Timeline.less +69 -0
  83. package/lib/style/css/components/Tooltip.less +230 -0
  84. package/lib/style/css/design/alerts.less +55 -0
  85. package/lib/style/css/design/aspect-ratio.less +23 -0
  86. package/lib/style/css/design/badges.less +120 -0
  87. package/lib/style/css/design/blockquote.less +49 -0
  88. package/lib/style/css/design/border.less +192 -0
  89. package/lib/style/css/design/breadcrumbs.less +20 -0
  90. package/lib/style/css/design/button-groups.less +194 -0
  91. package/lib/style/css/design/buttons.less +540 -0
  92. package/lib/style/css/design/callouts.less +27 -0
  93. package/lib/style/css/design/caret.less +28 -0
  94. package/lib/style/css/design/close.less +12 -0
  95. package/lib/style/css/design/code.less +45 -0
  96. package/lib/style/css/design/colors.less +202 -0
  97. package/lib/style/css/design/cols.less +56 -0
  98. package/lib/style/css/design/container.less +29 -0
  99. package/lib/style/css/design/cursors.less +19 -0
  100. package/lib/style/css/design/custom.less +20 -0
  101. package/lib/style/css/design/ellipsis.less +46 -0
  102. package/lib/style/css/design/flexgrid.less +7 -0
  103. package/lib/style/css/design/fonts.less +318 -0
  104. package/lib/style/css/design/form-input-groups.less +245 -0
  105. package/lib/style/css/design/form-inputs.less +655 -0
  106. package/lib/style/css/design/iframe.less +80 -0
  107. package/lib/style/css/design/images.less +47 -0
  108. package/lib/style/css/design/labels.less +66 -0
  109. package/lib/style/css/design/list-group.less +95 -0
  110. package/lib/style/css/design/navs.less +254 -0
  111. package/lib/style/css/design/normalize.less +436 -0
  112. package/lib/style/css/design/opacity.less +26 -0
  113. package/lib/style/css/design/overflow.less +1 -0
  114. package/lib/style/css/design/pagination.less +161 -0
  115. package/lib/style/css/design/panels.less +105 -0
  116. package/lib/style/css/design/popovers.less +117 -0
  117. package/lib/style/css/design/position.less +16 -0
  118. package/lib/style/css/design/progress-bars.less +131 -0
  119. package/lib/style/css/design/responsive/_imports.less +68 -0
  120. package/lib/style/css/design/responsive/backgrounds.less +32 -0
  121. package/lib/style/css/design/responsive/display.less +9 -0
  122. package/lib/style/css/design/responsive/flexgrid.less +75 -0
  123. package/lib/style/css/design/responsive/floating.less +4 -0
  124. package/lib/style/css/design/responsive/gap.less +41 -0
  125. package/lib/style/css/design/responsive/hyphens.less +14 -0
  126. package/lib/style/css/design/responsive/margin.less +127 -0
  127. package/lib/style/css/design/responsive/overflow.less +16 -0
  128. package/lib/style/css/design/responsive/padding.less +71 -0
  129. package/lib/style/css/design/responsive/position.less +102 -0
  130. package/lib/style/css/design/responsive/sizing.less +115 -0
  131. package/lib/style/css/design/responsive/text.less +71 -0
  132. package/lib/style/css/design/responsive/visibility.less +115 -0
  133. package/lib/style/css/design/responsive-embed.less +31 -0
  134. package/lib/style/css/design/responsive-video.less +22 -0
  135. package/lib/style/css/design/rioglyph.less +24 -0
  136. package/lib/style/css/design/rounded.less +44 -0
  137. package/lib/style/css/design/shadows.less +65 -0
  138. package/lib/style/css/design/tables.less +976 -0
  139. package/lib/style/css/design/text.less +201 -0
  140. package/lib/style/css/design/theme.less +200 -0
  141. package/lib/style/css/design/thumbnails.less +29 -0
  142. package/lib/style/css/design/transition.less +33 -0
  143. package/lib/style/css/design/type.less +159 -0
  144. package/lib/style/css/design/utilities.less +75 -0
  145. package/lib/style/css/design/visibilty.less +38 -0
  146. package/lib/style/css/design/wells.less +17 -0
  147. package/lib/style/css/design/z-index.less +21 -0
  148. package/lib/style/css/mapping/breakpoint-map.less +44 -0
  149. package/lib/style/css/mapping/color-map.less +200 -0
  150. package/lib/style/css/mapping/cols-map.less +15 -0
  151. package/lib/style/css/mapping/numbers-map.less +16 -0
  152. package/lib/style/css/mapping/positions-map.less +21 -0
  153. package/lib/style/css/mapping/sizes-map.less +129 -0
  154. package/lib/style/css/mapping/spacings-map.less +28 -0
  155. package/lib/style/css/mixins/_mixins.less +13 -0
  156. package/lib/style/css/mixins/alerts.less +13 -0
  157. package/lib/style/css/mixins/border-radius.less +16 -0
  158. package/lib/style/css/mixins/buttons.less +117 -0
  159. package/lib/style/css/mixins/clearfix.less +9 -0
  160. package/lib/style/css/mixins/cols.less +59 -0
  161. package/lib/style/css/mixins/forms.less +61 -0
  162. package/lib/style/css/mixins/panels.less +27 -0
  163. package/lib/style/css/mixins/placeholder.less +17 -0
  164. package/lib/style/css/mixins/reset.less +27 -0
  165. package/lib/style/css/mixins/sizings.less +21 -0
  166. package/lib/style/css/mixins/spinner.less +30 -0
  167. package/lib/style/css/mixins/table.less +26 -0
  168. package/lib/style/css/mixins/tabs.less +4 -0
  169. package/lib/style/css/mixins/text.less +5 -0
  170. package/lib/style/css/print/print.less +1 -4
  171. package/lib/style/css/rio-theme/alerts.less +23 -61
  172. package/lib/style/css/rio-theme/badges.less +16 -28
  173. package/lib/style/css/rio-theme/blockquote.less +14 -97
  174. package/lib/style/css/rio-theme/mixins/alerts.less +13 -1
  175. package/lib/style/css/shared/colors.json +1 -1
  176. package/lib/style/css/shared/colors.less +11 -8
  177. package/lib/style/css/shared/text.less +6 -5
  178. package/lib/style/css/utils/responsive/grid.less +15 -6
  179. package/lib/style/css/variables.less +179 -0
  180. package/lib/style/fonts/rioglyph/rioglyph.less +1 -11
  181. package/lib/types.ts +38 -57
  182. package/lib/utils/buttonEffect.js +3 -1
  183. package/lib/utils/deviceUtils.js +40 -3
  184. package/lib/utils/init.js +22 -7
  185. package/lib/version.json +1 -1
  186. package/package.json +46 -30
@@ -0,0 +1,55 @@
1
+ .alert {
2
+ border-color: transparent;
3
+ border-radius: @border-radius-default;
4
+ border-style: solid;
5
+ border-width: 2px;
6
+ padding: 12px;
7
+ position: relative;
8
+
9
+ .alert-link {
10
+ font-weight: bold;
11
+ }
12
+
13
+ &.alert-dismissible {
14
+ padding-right: 30px;
15
+ }
16
+
17
+ > .close {
18
+ position: absolute;
19
+ right: 3px;
20
+ top: 6px;
21
+ transform: scale(0.75);
22
+ }
23
+
24
+ > p,
25
+ > ul {
26
+ margin-bottom: 0;
27
+ }
28
+
29
+ // primary
30
+ // secondary
31
+ // info
32
+ // success
33
+ // warning
34
+ // danger
35
+ each(@colors-brand-and-status-map, {
36
+ @background: @colors-brand-and-status-decent-map[$@key];
37
+
38
+ &.alert- {
39
+ &@{key} {
40
+
41
+ background-color: @background;
42
+ border-color: @value;
43
+ color: @value;
44
+
45
+ .alert-link {
46
+ color: @value;
47
+ }
48
+
49
+ > .close .rioglyph {
50
+ color: @value;
51
+ }
52
+ }
53
+ }
54
+ })
55
+ }
@@ -0,0 +1,23 @@
1
+ .aspect-ratio-resizer {
2
+ display: grid;
3
+ position: relative;
4
+
5
+ > * {
6
+ grid-area: ~"1 / 1 / 2 / 2";
7
+ }
8
+
9
+ .aspect-ratio-placeholder {
10
+ position: absolute;
11
+ top: 50%;
12
+ left: 50%;
13
+ transform: translate(-50%,-50%);
14
+ }
15
+ }
16
+
17
+ // Aspect ratio related to elements width and height attributes
18
+ .aspect-ratio-1 { aspect-ratio: 1 / 1 }
19
+ .aspect-ratio-1-2 { aspect-ratio: 1 / 2 }
20
+ .aspect-ratio-2-1 { aspect-ratio: 2 / 1 }
21
+ .aspect-ratio-4-3 { aspect-ratio: 4 / 3 }
22
+ .aspect-ratio-16-9 { aspect-ratio: 16 / 9 }
23
+ .aspect-ratio-16-10 { aspect-ratio: 16 / 10 }
@@ -0,0 +1,120 @@
1
+ .badge {
2
+ background-color: @brand-primary;
3
+ border-radius: @border-radius-round;
4
+ color: @color-white;
5
+ display: inline-block;
6
+ font-size: 12px;
7
+ font-weight: normal;
8
+ line-height: 1;
9
+ min-height: 16px;
10
+ min-width: 16px;
11
+ position: relative;
12
+ vertical-align: baseline;
13
+
14
+ // Empty badges are just a dot
15
+ &:not(:empty) {
16
+ padding: 4px 7px;
17
+ }
18
+
19
+ &-lg {
20
+ font-size: 16px;
21
+ min-width: 24px;
22
+ }
23
+
24
+ &-xl {
25
+ font-size: 20px;
26
+ min-width: 30px;
27
+ padding: 4px 9px;
28
+ }
29
+
30
+ &-indicator {
31
+ display: grid;
32
+ place-items: center;
33
+ position: absolute;
34
+ right: 0;
35
+ top: 0;
36
+ z-index: 1;
37
+ transform: translate(50%, -50%);
38
+
39
+ .ActionBarItemIcon & {
40
+ border: 2px solid @color-white;
41
+ left: 50%;
42
+ position: absolute;
43
+ right: auto;
44
+ top: 5px;
45
+ transform: none;
46
+ }
47
+
48
+ &-border {
49
+ border: 2px solid @color-white;
50
+ }
51
+
52
+ &-pinging {
53
+ &:before {
54
+ animation:pinging 1s cubic-bezier(0,0,.2,1) infinite;
55
+ border-radius: @border-radius-round;
56
+ bottom: 0;
57
+ content: "";
58
+ left: 0;
59
+ pointer-events: none;
60
+ position: absolute;
61
+ right: 0;
62
+ top: 0;
63
+ z-index: -1;
64
+ }
65
+ }
66
+ }
67
+
68
+ // muted
69
+ // default
70
+ // primary
71
+ // secondary
72
+ // info
73
+ // success
74
+ // warning
75
+ // danger
76
+ &-muted {
77
+ color: @gray-dark;
78
+ box-shadow: inset 0px 0px 0px 1px @gray-light;
79
+ background-color: @gray-lightest;
80
+
81
+ &.badge-indicator-pinging {
82
+ &:before {
83
+ background-color: @gray-light;
84
+ }
85
+ }
86
+ }
87
+
88
+ &-default {
89
+ background-color: @gray-dark;
90
+
91
+ &.badge-indicator-pinging {
92
+ &:before {
93
+ background-color: @gray-dark;
94
+ }
95
+ }
96
+ }
97
+
98
+ each(@colors-brand-and-status-map, {
99
+ &.badge-@{key} {
100
+ background-color: @value;
101
+
102
+ &.badge-indicator-pinging {
103
+ &:before {
104
+ background-color: @value;
105
+ }
106
+ }
107
+ }
108
+ })
109
+ }
110
+
111
+ .indicated-button,
112
+ .indicated-icon {
113
+ position: relative;
114
+ }
115
+
116
+ .indicated-icon {
117
+ .rioglyph {
118
+ font-size: 26px;
119
+ }
120
+ }
@@ -0,0 +1,49 @@
1
+ blockquote {
2
+ font-size: (@font-size-default * 1.25);
3
+ margin: 0;
4
+ padding: 2% 0 2% 10%;
5
+ position: relative;
6
+
7
+ &:before {
8
+ content: "“";
9
+ display: flex;
10
+ font-size: 50px;
11
+ height: 50px;
12
+ left: 0;
13
+ line-height: 50px;
14
+ pointer-events: none;
15
+ position: absolute;
16
+ text-align: center;
17
+ top: 0;
18
+ user-select: none;
19
+ width: 6%;
20
+ }
21
+
22
+ each(@colors-text-map, {
23
+ &.quote-color- {
24
+ &@{key}:before {
25
+ color: @value !important
26
+ }
27
+ }
28
+ })
29
+
30
+ each(@colors-gray-map, {
31
+ &.quote-color- {
32
+ &@{key}:before {
33
+ color: @value !important
34
+ }
35
+ }
36
+ })
37
+
38
+ p,
39
+ ul,
40
+ ol {
41
+ &:first-child {
42
+ margin-top: 0 !important;
43
+ }
44
+
45
+ &:last-child {
46
+ margin-bottom: 0 !important;
47
+ }
48
+ }
49
+ }
@@ -0,0 +1,192 @@
1
+ // default values used as shorthand ".border" class
2
+ // no !important here, because other classes will not work then
3
+ .border {
4
+ border-color: @gray-light;
5
+ border-style: solid;
6
+ border-width: 1px;
7
+ }
8
+
9
+ // border
10
+ .border {
11
+ &-style-solid { border-style: solid !important}
12
+ &-style-dotted { border-style: dotted !important}
13
+ &-style-dashed { border-style: dashed !important}
14
+
15
+ &-width,
16
+ &-size { // backward compatibility
17
+ &-1 { border-width: 1px !important}
18
+ &-2 { border-width: 2px !important}
19
+ &-3 { border-width: 3px !important}
20
+ }
21
+
22
+ &-none { border: none !important }
23
+
24
+ &-top-none,
25
+ &-top-0 { // backward compatibility
26
+ border-top-style: none !important
27
+ }
28
+
29
+ &-top-only {
30
+ border-right-style: none !important;
31
+ border-bottom-style: none !important;
32
+ border-left-style: none !important;
33
+ }
34
+
35
+ &-right-none,
36
+ &-right-0 { // backward compatibility
37
+ border-right-style: none !important
38
+ }
39
+
40
+ &-right-only {
41
+ border-top-style: none !important;
42
+ border-bottom-style: none !important;
43
+ border-left-style: none !important;
44
+ }
45
+
46
+ &-bottom-none,
47
+ &-bottom-0 { // backward compatibility
48
+ border-bottom-style: none !important
49
+ }
50
+
51
+ &-bottom-only {
52
+ border-top-style: none !important;
53
+ border-right-style: none !important;
54
+ border-left-style: none !important;
55
+ }
56
+
57
+ &-left-none,
58
+ &-left-0 { // backward compatibility
59
+ border-left-style: none !important
60
+ }
61
+
62
+ &-left-only {
63
+ border-top-style: none !important;
64
+ border-right-style: none !important;
65
+ border-bottom-style: none !important;
66
+ }
67
+ }
68
+
69
+ // border coloring
70
+
71
+ // transparent
72
+ .border-color-transparent {
73
+ border-color: transparent !important
74
+ }
75
+
76
+ // white
77
+ // black
78
+ each(@colors-text-map, {
79
+ .border-color-@{key} {
80
+ border-color: @value !important;
81
+ }
82
+ })
83
+
84
+ // primary
85
+ // secondary
86
+ each(@colors-brand-map, {
87
+ .border-color-@{key} {
88
+ border-color: @value !important;
89
+ }
90
+ })
91
+
92
+ // info
93
+ // success
94
+ // warning
95
+ // danger
96
+ each(@colors-status-map, {
97
+ .border-color-@{key} {
98
+ border-color: @value !important;
99
+ }
100
+ })
101
+
102
+ // darkest
103
+ // darker
104
+ // dark
105
+ // gray
106
+ // light
107
+ // lighter
108
+ // lightest
109
+ each(@colors-gray-map, {
110
+ .border-color-@{key} {
111
+ border-color: @value !important;
112
+ }
113
+ })
114
+
115
+ // map-marker-asset
116
+ // map-marker-poi
117
+ // map-marker-geofence
118
+ // map-marker-route
119
+ each(@colors-map-marker-map, {
120
+ .border-color-@{key} {
121
+ border-color: @value !important;
122
+ }
123
+ })
124
+
125
+ // rating-1
126
+ // rating-2
127
+ // rating-3
128
+ // rating-4
129
+ // rating-5
130
+ each(@colors-rating-map, {
131
+ .border-color-@{key} {
132
+ border-color: @value !important;
133
+ }
134
+ })
135
+
136
+ // status-available
137
+ // status-driving
138
+ // status-resting
139
+ // status-working
140
+ each(@colors-driving-status-map, {
141
+ .border-color-@{key} {
142
+ border-color: @value !important;
143
+ }
144
+ })
145
+
146
+ // highlight-darkest
147
+ // highlight-darker
148
+ // highlight-dark
149
+ // highlight
150
+ // highlight-light
151
+ // highlight-lighter
152
+ // highlight-lightest
153
+ // highlight-decent
154
+ each(@colors-highlight-map, {
155
+ .border-color-@{key} {
156
+ border-color: @value !important;
157
+ }
158
+ })
159
+
160
+ // coldplay-wine
161
+ // coldplay-aubergine
162
+ // coldplay-kashmir
163
+ // coldplay-fountain
164
+ // coldplay-turquoise
165
+ // coldplay-bermuda
166
+ // coldplay-moos
167
+ // coldplay-primrose
168
+ // coldplay-khaki
169
+ & when (@buildColdplayColors = true) {
170
+ each(@colors-coldplay-map, {
171
+ .border-color-@{key} {
172
+ border-color: @value !important;
173
+ }
174
+ })
175
+ }
176
+
177
+ // warmup-crimson
178
+ // warmup-victoria
179
+ // warmup-cadillac
180
+ // warmup-raspberry
181
+ // warmup-cerise
182
+ // warmup-charm
183
+ // warmup-salmon
184
+ // warmup-cherokee
185
+ // warmup-corn
186
+ & when (@buildWarmupColors = true) {
187
+ each(@colors-warmup-map, {
188
+ .border-color-@{key} {
189
+ border-color: @value !important;
190
+ }
191
+ })
192
+ }
@@ -0,0 +1,20 @@
1
+ .breadcrumb {
2
+ .list-unstyled();
3
+ margin-bottom: 0;
4
+ padding: 8px 15px;
5
+
6
+ > li {
7
+ display: inline-block;
8
+
9
+ + li:before {
10
+ color: @gray-light;
11
+ content: "/";
12
+ padding: 0 5px;
13
+ }
14
+ }
15
+
16
+ > .active {
17
+ color: @gray-dark;
18
+ cursor: default;
19
+ }
20
+ }
@@ -0,0 +1,194 @@
1
+ .btn-group {
2
+ display: inline-flex;
3
+
4
+ > .btn {
5
+ position: relative;
6
+
7
+ // Bring the "active" button to the front
8
+ &:hover,
9
+ &:focus,
10
+ &:active,
11
+ &.active {
12
+ z-index: 2;
13
+ }
14
+ }
15
+
16
+ .btn + .btn,
17
+ .btn + .btn-group,
18
+ .btn-group + .btn,
19
+ .btn-group + .btn-group {
20
+ margin-left: -1px;
21
+ }
22
+ }
23
+
24
+ .btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
25
+ border-radius: 0;
26
+ }
27
+
28
+ // Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
29
+ .btn-group > .btn:first-child {
30
+ margin-left: 0;
31
+
32
+ &:not(:last-child):not(.dropdown-toggle) {
33
+ .border-right-radius(0);
34
+ }
35
+ }
36
+ // Need .dropdown-toggle since :last-child doesn't apply, given that a .dropdown-menu is used immediately after it
37
+ .btn-group > .btn:last-child:not(:first-child),
38
+ .btn-group > .dropdown-toggle:not(:first-child) {
39
+ .border-left-radius(0);
40
+ }
41
+
42
+ .btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
43
+ border-radius: 0;
44
+ }
45
+
46
+ .btn-group > .btn-group:first-child:not(:last-child) {
47
+ > .btn:last-child,
48
+ > .dropdown-toggle {
49
+ .border-right-radius(0);
50
+ }
51
+ }
52
+
53
+ .btn-group > .btn-group:last-child:not(:first-child) > .btn:first-child {
54
+ .border-left-radius(0);
55
+ }
56
+
57
+ // On active and open, don't show outline
58
+ .btn-group .dropdown-toggle:active,
59
+ .btn-group.open .dropdown-toggle {
60
+ outline: 0;
61
+ }
62
+
63
+
64
+ // Sizing
65
+ //
66
+ // Remix the default button sizing classes into new ones for easier manipulation.
67
+
68
+ .btn-group-xs > .btn { &:extend(.btn-xs); }
69
+ .btn-group-sm > .btn { &:extend(.btn-sm); }
70
+ .btn-group-lg > .btn { &:extend(.btn-lg); }
71
+
72
+
73
+ // Split button dropdowns
74
+ // ----------------------
75
+
76
+ // Give the line between buttons some depth
77
+ .btn-group > .btn + .dropdown-toggle {
78
+ padding-left: 8px;
79
+ padding-right: 8px;
80
+ }
81
+
82
+ .btn-group > .btn-lg + .dropdown-toggle {
83
+ padding-left: 12px;
84
+ padding-right: 12px;
85
+ }
86
+
87
+ // The clickable button for toggling the menu
88
+ // Remove the gradient and set the same inset shadow as the :active state
89
+ .btn-group.open .dropdown-toggle {
90
+ box-shadow:inset 0 3px 5px rgba(0,0,0,.125);
91
+
92
+ // Show no shadow for `.btn-link` since it has no other button styles.
93
+ &.btn-link {
94
+ box-shadow:none;
95
+ }
96
+ }
97
+
98
+
99
+ // Reposition the caret
100
+ .btn .caret {
101
+ margin-left: 0;
102
+ }
103
+
104
+ // Carets in other button sizes
105
+ .btn-lg .caret {
106
+ border-width: 5px 5px 0;
107
+ border-bottom-width: 0;
108
+ }
109
+
110
+ // Upside down carets for .dropup
111
+ .dropup .btn-lg .caret {
112
+ border-width: 0 5px 5px;
113
+ }
114
+
115
+
116
+ // Vertical button groups
117
+ // ----------------------
118
+
119
+ .btn-group-vertical {
120
+ > .btn,
121
+ > .btn-group,
122
+ > .btn-group > .btn {
123
+ display: block;
124
+ width: 100%;
125
+ max-width: 100%;
126
+ }
127
+
128
+ // Clear floats so dropdown menus can be properly placed
129
+ > .btn-group {
130
+ &:extend(.clearfix all);
131
+ }
132
+
133
+ > .btn + .btn,
134
+ > .btn + .btn-group,
135
+ > .btn-group + .btn,
136
+ > .btn-group + .btn-group {
137
+ margin-top: -1px;
138
+ margin-left: 0;
139
+ }
140
+ }
141
+
142
+ .btn-group-vertical > .btn {
143
+ &:not(:first-child):not(:last-child) {
144
+ border-radius: 0;
145
+ }
146
+
147
+ &:first-child:not(:last-child) {
148
+ .border-top-radius(@border-radius-default);
149
+ .border-bottom-radius(0);
150
+ }
151
+
152
+ &:last-child:not(:first-child) {
153
+ .border-top-radius(0);
154
+ .border-bottom-radius(@border-radius-default);
155
+ }
156
+ }
157
+
158
+ .btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
159
+ border-radius: 0;
160
+ }
161
+
162
+ .btn-group-vertical > .btn-group:first-child:not(:last-child) {
163
+ > .btn:last-child,
164
+ > .dropdown-toggle {
165
+ .border-bottom-radius(0);
166
+ }
167
+ }
168
+
169
+ .btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
170
+ .border-top-radius(0);
171
+ }
172
+
173
+ .btn-group-justified {
174
+ border-collapse: inherit;
175
+ display: flex;
176
+ table-layout: inherit;
177
+ width: 100%;
178
+
179
+ > .btn,
180
+ > .btn-group {
181
+ display: flex;
182
+ flex: 1 1 auto;
183
+ float: none;
184
+ width: 0;
185
+ }
186
+
187
+ > .btn-group .btn {
188
+ width: 100%;
189
+ }
190
+
191
+ > .btn-group .dropdown-menu {
192
+ left: auto;
193
+ }
194
+ }