@stoplight/ui-kit 3.0.0-beta.37 → 3.0.0-beta.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TableOfContents/index.d.ts +3 -0
- package/TableOfContents/index.js +45 -6
- package/TableOfContents/index.js.map +1 -1
- package/package.json +1 -1
- package/styles/_blueprint.scss +4 -4
- package/styles/blueprint/_variables.scss +3 -1
- package/styles/blueprint/select/blueprint-select.scss +8 -0
- package/styles/blueprint/select/components/_index.scss +6 -0
- package/styles/blueprint/select/components/omnibar/_omnibar.scss +63 -0
- package/styles/blueprint/select/components/select/_multi-select.scss +17 -0
- package/styles/blueprint/select/components/select/_select.scss +31 -0
- package/styles/blueprint/src/_reset.scss +43 -0
- package/styles/blueprint/src/_typography.scss +459 -0
- package/styles/blueprint/src/accessibility/_focus-states.scss +17 -0
- package/styles/blueprint/src/blueprint-hi-contrast.scss +22 -0
- package/styles/blueprint/src/blueprint.scss +16 -0
- package/styles/blueprint/src/common/_color-aliases.scss +43 -0
- package/styles/blueprint/src/common/_colors.scss +116 -0
- package/styles/blueprint/src/common/_flex.scss +49 -0
- package/styles/blueprint/src/common/_mixins.scss +128 -0
- package/styles/blueprint/src/common/_react-transition.scss +117 -0
- package/styles/blueprint/src/common/_variables.scss +131 -0
- package/styles/blueprint/src/components/_index.scss +38 -0
- package/styles/blueprint/src/components/alert/_alert.scss +33 -0
- package/styles/blueprint/src/components/breadcrumbs/_breadcrumbs.scss +142 -0
- package/styles/blueprint/src/components/button/_button-group.scss +240 -0
- package/styles/blueprint/src/components/button/_button.scss +206 -0
- package/styles/blueprint/src/components/button/_common.scss +507 -0
- package/styles/blueprint/src/components/callout/_callout.scss +99 -0
- package/styles/blueprint/src/components/card/_card.scss +91 -0
- package/styles/blueprint/src/components/collapse/_collapse.scss +20 -0
- package/styles/blueprint/src/components/context-menu/_context-menu.scss +10 -0
- package/styles/blueprint/src/components/dialog/_dialog.scss +146 -0
- package/styles/blueprint/src/components/divider/_divider.scss +19 -0
- package/styles/blueprint/src/components/drawer/_drawer.scss +232 -0
- package/styles/blueprint/src/components/editable-text/_editable-text.scss +156 -0
- package/styles/blueprint/src/components/forms/_common.scss +239 -0
- package/styles/blueprint/src/components/forms/_control-group.scss +276 -0
- package/styles/blueprint/src/components/forms/_controls.scss +526 -0
- package/styles/blueprint/src/components/forms/_file-input.scss +155 -0
- package/styles/blueprint/src/components/forms/_form-group.scss +111 -0
- package/styles/blueprint/src/components/forms/_index.scss +20 -0
- package/styles/blueprint/src/components/forms/_input-group.scss +247 -0
- package/styles/blueprint/src/components/forms/_input.scss +115 -0
- package/styles/blueprint/src/components/forms/_label.scss +114 -0
- package/styles/blueprint/src/components/forms/_numeric-input.scss +40 -0
- package/styles/blueprint/src/components/hotkeys/_hotkeys.scss +50 -0
- package/styles/blueprint/src/components/html-select/_common.scss +52 -0
- package/styles/blueprint/src/components/html-select/_html-select.scss +104 -0
- package/styles/blueprint/src/components/html-table/_html-table.scss +208 -0
- package/styles/blueprint/src/components/icon/_icon.scss +79 -0
- package/styles/blueprint/src/components/menu/_common.scss +172 -0
- package/styles/blueprint/src/components/menu/_menu.scss +197 -0
- package/styles/blueprint/src/components/menu/_submenu.scss +41 -0
- package/styles/blueprint/src/components/navbar/_navbar.scss +117 -0
- package/styles/blueprint/src/components/non-ideal-state/_non-ideal-state.scss +43 -0
- package/styles/blueprint/src/components/overflow-list/_overflow-list.scss +13 -0
- package/styles/blueprint/src/components/overlay/_overlay.scss +94 -0
- package/styles/blueprint/src/components/panel-stack/_panel-stack.scss +103 -0
- package/styles/blueprint/src/components/popover/_common.scss +171 -0
- package/styles/blueprint/src/components/popover/_popover.scss +127 -0
- package/styles/blueprint/src/components/portal/_portal.scss +15 -0
- package/styles/blueprint/src/components/progress-bar/_common.scss +9 -0
- package/styles/blueprint/src/components/progress-bar/_progress-bar.scss +98 -0
- package/styles/blueprint/src/components/skeleton/_common.scss +8 -0
- package/styles/blueprint/src/components/skeleton/_skeleton.scss +64 -0
- package/styles/blueprint/src/components/slider/_common.scss +48 -0
- package/styles/blueprint/src/components/slider/_slider.scss +216 -0
- package/styles/blueprint/src/components/spinner/_spinner.scss +65 -0
- package/styles/blueprint/src/components/tabs/_tabs.scss +199 -0
- package/styles/blueprint/src/components/tag/_common.scss +202 -0
- package/styles/blueprint/src/components/tag/_tag.scss +75 -0
- package/styles/blueprint/src/components/tag-input/_tag-input.scss +165 -0
- package/styles/blueprint/src/components/toast/_toast.scss +203 -0
- package/styles/blueprint/src/components/tooltip/_common.scss +11 -0
- package/styles/blueprint/src/components/tooltip/_tooltip.scss +61 -0
- package/styles/blueprint/src/components/tree/_tree.scss +194 -0
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// Copyright 2015 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "~@blueprintjs/icons/src/icons";
|
|
5
|
+
@import "../../common/variables";
|
|
6
|
+
@import "../button/common";
|
|
7
|
+
|
|
8
|
+
$input-padding-horizontal: $pt-grid-size !default;
|
|
9
|
+
$input-small-padding: $pt-input-height-small - $pt-icon-size-standard !default;
|
|
10
|
+
$input-font-weight: 400 !default;
|
|
11
|
+
$input-transition: box-shadow $pt-transition-duration $pt-transition-ease;
|
|
12
|
+
|
|
13
|
+
$input-color: $pt-text-color !default;
|
|
14
|
+
$input-color-disabled: $button-color-disabled !default;
|
|
15
|
+
$input-placeholder-color: $pt-text-color-disabled !default;
|
|
16
|
+
$input-background-color: $white !default;
|
|
17
|
+
$input-background-color-disabled: rgba($light-gray1, 0.5) !default;
|
|
18
|
+
$input-shadow-color-focus: $pt-intent-primary !default;
|
|
19
|
+
|
|
20
|
+
$dark-input-color: $pt-dark-text-color !default;
|
|
21
|
+
$dark-input-color-disabled: $dark-button-color-disabled !default;
|
|
22
|
+
$dark-input-placeholder-color: $pt-dark-text-color-disabled !default;
|
|
23
|
+
$dark-input-background-color: rgba($black, 0.3) !default;
|
|
24
|
+
$dark-input-background-color-disabled: rgba($dark-gray5, 0.5) !default;
|
|
25
|
+
$dark-input-shadow-color-focus: $pt-intent-primary !default;
|
|
26
|
+
|
|
27
|
+
$control-indicator-size: $pt-icon-size-standard !default;
|
|
28
|
+
$control-indicator-size-large: $pt-icon-size-large !default;
|
|
29
|
+
|
|
30
|
+
// avoids edge blurriness for light theme focused default input
|
|
31
|
+
// second box-shadow of $pt-input-box-shadow
|
|
32
|
+
$input-box-shadow-focus: inset 0 1px 1px rgba($black, $pt-drop-shadow-opacity) !default;
|
|
33
|
+
|
|
34
|
+
// for best visual results, button group and control group elements should be
|
|
35
|
+
// stacked in the following order to ensure sharp edges in all cases and states:
|
|
36
|
+
|
|
37
|
+
$control-group-stack: (
|
|
38
|
+
// lowest z-index
|
|
39
|
+
"input-disabled",
|
|
40
|
+
"input-default",
|
|
41
|
+
"button-disabled",
|
|
42
|
+
"button-default",
|
|
43
|
+
"button-focus",
|
|
44
|
+
"button-hover",
|
|
45
|
+
"button-active",
|
|
46
|
+
"intent-button-disabled",
|
|
47
|
+
"intent-button-default",
|
|
48
|
+
"intent-button-focus",
|
|
49
|
+
"intent-button-hover",
|
|
50
|
+
"intent-button-active",
|
|
51
|
+
"intent-input-default",
|
|
52
|
+
"input-focus",
|
|
53
|
+
"intent-input-focus",
|
|
54
|
+
"input-group-children",
|
|
55
|
+
"select-caret"
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
// animating shadows requires the same number of shadows in different states
|
|
59
|
+
@function input-transition-shadow($color: $input-shadow-color-focus, $focus: false) {
|
|
60
|
+
@if $focus {
|
|
61
|
+
@return
|
|
62
|
+
border-shadow(1, $color, 1px),
|
|
63
|
+
border-shadow(0.3, $color, 3px);
|
|
64
|
+
} @else {
|
|
65
|
+
@return
|
|
66
|
+
border-shadow(0, $color, 0),
|
|
67
|
+
border-shadow(0, $color, 0);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@function dark-input-transition-shadow($color: $dark-input-shadow-color-focus, $focus: false) {
|
|
72
|
+
@if $focus {
|
|
73
|
+
@return
|
|
74
|
+
border-shadow(1, $color, 1px),
|
|
75
|
+
border-shadow(1, $color, 1px), // duplicating to minimize browser antialiasing in dark
|
|
76
|
+
border-shadow(0.3, $color, 3px);
|
|
77
|
+
} @else {
|
|
78
|
+
@return
|
|
79
|
+
border-shadow(0, $color, 0),
|
|
80
|
+
border-shadow(0, $color, 0),
|
|
81
|
+
border-shadow(0, $color, 0);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@mixin pt-input() {
|
|
86
|
+
@include pt-input-placeholder();
|
|
87
|
+
appearance: none;
|
|
88
|
+
background: $input-background-color;
|
|
89
|
+
border: none;
|
|
90
|
+
border-radius: $pt-border-radius;
|
|
91
|
+
box-shadow: input-transition-shadow($input-shadow-color-focus), $pt-input-box-shadow;
|
|
92
|
+
color: $input-color;
|
|
93
|
+
font-size: $pt-font-size;
|
|
94
|
+
font-weight: $input-font-weight;
|
|
95
|
+
height: $pt-input-height;
|
|
96
|
+
line-height: $pt-input-height;
|
|
97
|
+
|
|
98
|
+
outline: none;
|
|
99
|
+
padding: 0 $input-padding-horizontal;
|
|
100
|
+
transition: $input-transition;
|
|
101
|
+
vertical-align: middle;
|
|
102
|
+
|
|
103
|
+
&:focus,
|
|
104
|
+
&.#{$ns}-active {
|
|
105
|
+
box-shadow: input-transition-shadow($input-shadow-color-focus, true), $input-box-shadow-focus;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&[type="search"],
|
|
109
|
+
&.#{$ns}-round {
|
|
110
|
+
border-radius: $pt-input-height;
|
|
111
|
+
// override normalize.css
|
|
112
|
+
box-sizing: border-box;
|
|
113
|
+
padding-left: $pt-grid-size;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&[readonly] {
|
|
117
|
+
box-shadow: inset 0 0 0 1px $pt-divider-black;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:disabled,
|
|
121
|
+
&.#{$ns}-disabled {
|
|
122
|
+
@include pt-input-disabled();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@mixin pt-input-placeholder() {
|
|
127
|
+
&::placeholder {
|
|
128
|
+
color: $input-placeholder-color;
|
|
129
|
+
// normalize.css sets an opacity less than 1, we don't want this
|
|
130
|
+
opacity: 1;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@mixin pt-input-disabled() {
|
|
135
|
+
background: $input-background-color-disabled;
|
|
136
|
+
box-shadow: none;
|
|
137
|
+
color: $input-color-disabled;
|
|
138
|
+
cursor: not-allowed;
|
|
139
|
+
resize: none;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
@mixin pt-input-large() {
|
|
143
|
+
font-size: $pt-font-size-large;
|
|
144
|
+
height: $pt-input-height-large;
|
|
145
|
+
line-height: $pt-input-height-large;
|
|
146
|
+
|
|
147
|
+
&[type="search"],
|
|
148
|
+
&.#{$ns}-round {
|
|
149
|
+
padding: 0 ($input-padding-horizontal * 1.5);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@mixin pt-input-small() {
|
|
154
|
+
font-size: $pt-font-size-small;
|
|
155
|
+
height: $pt-input-height-small;
|
|
156
|
+
line-height: $pt-input-height-small;
|
|
157
|
+
padding-left: $input-small-padding;
|
|
158
|
+
padding-right: $input-small-padding;
|
|
159
|
+
|
|
160
|
+
&[type="search"],
|
|
161
|
+
&.#{$ns}-round {
|
|
162
|
+
padding: 0 ($input-small-padding * 1.5);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@mixin pt-dark-input-disabled() {
|
|
167
|
+
background: $dark-input-background-color-disabled;
|
|
168
|
+
box-shadow: none;
|
|
169
|
+
color: $dark-input-color-disabled;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@mixin pt-dark-input-placeholder() {
|
|
173
|
+
&::placeholder {
|
|
174
|
+
color: $dark-input-placeholder-color;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@mixin pt-dark-input() {
|
|
179
|
+
@include pt-dark-input-placeholder();
|
|
180
|
+
background: $dark-input-background-color;
|
|
181
|
+
|
|
182
|
+
box-shadow: dark-input-transition-shadow($dark-input-shadow-color-focus),
|
|
183
|
+
$pt-dark-input-box-shadow;
|
|
184
|
+
color: $dark-input-color;
|
|
185
|
+
|
|
186
|
+
&:focus {
|
|
187
|
+
box-shadow: dark-input-transition-shadow($dark-input-shadow-color-focus, true),
|
|
188
|
+
$pt-dark-input-box-shadow;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
&[readonly] {
|
|
192
|
+
box-shadow: inset 0 0 0 1px $pt-dark-divider-black;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
&:disabled,
|
|
196
|
+
&.#{$ns}-disabled {
|
|
197
|
+
@include pt-dark-input-disabled();
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@mixin pt-input-intent($color) {
|
|
202
|
+
box-shadow: input-transition-shadow($color),
|
|
203
|
+
inset border-shadow(1, $color),
|
|
204
|
+
$pt-input-box-shadow;
|
|
205
|
+
|
|
206
|
+
&:focus {
|
|
207
|
+
box-shadow: input-transition-shadow($color, true),
|
|
208
|
+
$input-box-shadow-focus;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
&[readonly] {
|
|
212
|
+
box-shadow: inset 0 0 0 1px $color;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
&:disabled,
|
|
216
|
+
&.#{$ns}-disabled {
|
|
217
|
+
box-shadow: none;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@mixin pt-dark-input-intent($color) {
|
|
222
|
+
box-shadow: dark-input-transition-shadow($color),
|
|
223
|
+
inset border-shadow(1, $color),
|
|
224
|
+
$pt-dark-input-box-shadow;
|
|
225
|
+
|
|
226
|
+
&:focus {
|
|
227
|
+
box-shadow: dark-input-transition-shadow($color, true),
|
|
228
|
+
$pt-dark-input-box-shadow;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&[readonly] {
|
|
232
|
+
box-shadow: inset 0 0 0 1px $color;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&:disabled,
|
|
236
|
+
&.#{$ns}-disabled {
|
|
237
|
+
box-shadow: none;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
// Copyright 2016 Palantir Technologies, Inc. All rights reserved.
|
|
2
|
+
// Licensed under the Apache License, Version 2.0.
|
|
3
|
+
|
|
4
|
+
@import "../../common/variables";
|
|
5
|
+
@import "../button/common";
|
|
6
|
+
@import "./common";
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
Control groups
|
|
10
|
+
|
|
11
|
+
Markup:
|
|
12
|
+
<div class="#{$ns}-control-group">
|
|
13
|
+
<button class="#{$ns}-button #{$ns}-icon-filter">Filter</button>
|
|
14
|
+
<input type="text" class="#{$ns}-input" placeholder="Find filters..." />
|
|
15
|
+
</div>
|
|
16
|
+
<div class="#{$ns}-control-group">
|
|
17
|
+
<div class="#{$ns}-select">
|
|
18
|
+
<select>
|
|
19
|
+
<option selected>Filter...</option>
|
|
20
|
+
<option value="1">Issues</option>
|
|
21
|
+
<option value="2">Requests</option>
|
|
22
|
+
<option value="3">Projects</option>
|
|
23
|
+
</select>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="#{$ns}-input-group">
|
|
26
|
+
<span class="#{$ns}-icon #{$ns}-icon-search"></span>
|
|
27
|
+
<input type="text" class="#{$ns}-input" value="from:ggray to:allorca" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="#{$ns}-control-group">
|
|
31
|
+
<div class="#{$ns}-input-group">
|
|
32
|
+
<span class="#{$ns}-icon #{$ns}-icon-people"></span>
|
|
33
|
+
<input type="text" class="#{$ns}-input" placeholder="Find collaborators..." style="padding-right:94px" />
|
|
34
|
+
<div class="#{$ns}-input-action">
|
|
35
|
+
<button class="#{$ns}-button #{$ns}-minimal #{$ns}-intent-primary">
|
|
36
|
+
can view<span class="#{$ns}-icon-standard #{$ns}-icon-caret-down #{$ns}-align-right"></span>
|
|
37
|
+
</button>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<button class="#{$ns}-button #{$ns}-intent-primary">Add</button>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
Styleguide control-group
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
.#{$ns}-control-group {
|
|
47
|
+
// create a new stacking context to isolate all the z-indices
|
|
48
|
+
@include new-render-layer();
|
|
49
|
+
@include pt-flex-container(row);
|
|
50
|
+
// each child is full height
|
|
51
|
+
align-items: stretch;
|
|
52
|
+
|
|
53
|
+
// similarly to button groups, elements in control groups are stacked in a
|
|
54
|
+
// very particular order for best visual results. in each level of selector
|
|
55
|
+
// specificity, we define disabled styles last so that they override all other
|
|
56
|
+
// equally-specific styles (e.g. we don't want mouse interactions or focus
|
|
57
|
+
// changes to change the z-index of a disabled element).
|
|
58
|
+
|
|
59
|
+
.#{$ns}-button,
|
|
60
|
+
.#{$ns}-html-select,
|
|
61
|
+
.#{$ns}-input,
|
|
62
|
+
.#{$ns}-select {
|
|
63
|
+
// create a new stacking context
|
|
64
|
+
position: relative;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$ns}-input {
|
|
68
|
+
// inherit radius since it's most likely to be zero
|
|
69
|
+
border-radius: inherit;
|
|
70
|
+
z-index: index($control-group-stack, "input-default");
|
|
71
|
+
|
|
72
|
+
&:focus {
|
|
73
|
+
border-radius: $pt-border-radius;
|
|
74
|
+
z-index: index($control-group-stack, "input-focus");
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&[class*="#{$ns}-intent"] {
|
|
78
|
+
z-index: index($control-group-stack, "intent-input-default");
|
|
79
|
+
|
|
80
|
+
&:focus {
|
|
81
|
+
z-index: index($control-group-stack, "intent-input-focus");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&[readonly],
|
|
86
|
+
&:disabled,
|
|
87
|
+
&.#{$ns}-disabled {
|
|
88
|
+
z-index: index($control-group-stack, "input-disabled");
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.#{$ns}-input-group[class*="#{$ns}-intent"] .#{$ns}-input {
|
|
93
|
+
z-index: index($control-group-stack, "intent-input-default");
|
|
94
|
+
|
|
95
|
+
&:focus {
|
|
96
|
+
z-index: index($control-group-stack, "intent-input-focus");
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.#{$ns}-button,
|
|
101
|
+
.#{$ns}-html-select select,
|
|
102
|
+
.#{$ns}-select select {
|
|
103
|
+
@include new-render-layer();
|
|
104
|
+
// inherit radius since it's most likely to be zero
|
|
105
|
+
border-radius: inherit;
|
|
106
|
+
z-index: index($control-group-stack, "button-default");
|
|
107
|
+
|
|
108
|
+
&:focus {
|
|
109
|
+
z-index: index($control-group-stack, "button-focus");
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:hover {
|
|
113
|
+
z-index: index($control-group-stack, "button-hover");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:active {
|
|
117
|
+
z-index: index($control-group-stack, "button-active");
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&[readonly],
|
|
121
|
+
&:disabled,
|
|
122
|
+
&.#{$ns}-disabled {
|
|
123
|
+
z-index: index($control-group-stack, "button-disabled");
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&[class*="#{$ns}-intent"] {
|
|
127
|
+
z-index: index($control-group-stack, "intent-button-default");
|
|
128
|
+
|
|
129
|
+
&:focus {
|
|
130
|
+
z-index: index($control-group-stack, "intent-button-focus");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&:hover {
|
|
134
|
+
z-index: index($control-group-stack, "intent-button-hover");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:active {
|
|
138
|
+
z-index: index($control-group-stack, "intent-button-active");
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&[readonly],
|
|
142
|
+
&:disabled,
|
|
143
|
+
&.#{$ns}-disabled {
|
|
144
|
+
z-index: index($control-group-stack, "intent-button-disabled");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// input group contents appear above input always
|
|
150
|
+
.#{$ns}-input-group > .#{$ns}-icon,
|
|
151
|
+
.#{$ns}-input-group > .#{$ns}-button,
|
|
152
|
+
.#{$ns}-input-group > .#{$ns}-input-action {
|
|
153
|
+
z-index: index($control-group-stack, "input-group-children");
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// keep the select-menu carets on top of everything always (particularly when
|
|
157
|
+
// .#{$ns}-selects are focused).
|
|
158
|
+
.#{$ns}-select::after,
|
|
159
|
+
.#{$ns}-html-select::after,
|
|
160
|
+
.#{$ns}-select > .#{$ns}-icon,
|
|
161
|
+
.#{$ns}-html-select > .#{$ns}-icon {
|
|
162
|
+
z-index: index($control-group-stack, "select-caret");
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// have consecutive elements share a border
|
|
166
|
+
&:not(.#{$ns}-vertical) {
|
|
167
|
+
> * {
|
|
168
|
+
margin-right: -$button-border-width;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.#{$ns}-dark & {
|
|
172
|
+
> * {
|
|
173
|
+
margin-right: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// consecutive buttons within a button group look okay out of the box, but
|
|
177
|
+
// we need need to make a small correction for non-grouped buttons. this
|
|
178
|
+
// replicates what's already done in dark theme button groups.
|
|
179
|
+
> .#{$ns}-button + .#{$ns}-button {
|
|
180
|
+
margin-left: $button-border-width;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Add border radius inheritance to support components wrapped in a popover
|
|
186
|
+
.#{$ns}-popover-wrapper,
|
|
187
|
+
.#{$ns}-popover-target {
|
|
188
|
+
border-radius: inherit;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
// round the left corners of the left-most element
|
|
192
|
+
> :first-child {
|
|
193
|
+
border-radius: $pt-border-radius 0 0 $pt-border-radius;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// round the right corners of the right-most element
|
|
197
|
+
> :last-child {
|
|
198
|
+
border-radius: 0 $pt-border-radius $pt-border-radius 0;
|
|
199
|
+
margin-right: 0;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// round all the corners of the only child element
|
|
203
|
+
> :only-child {
|
|
204
|
+
border-radius: $pt-border-radius;
|
|
205
|
+
margin-right: 0;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// bring back border radius on these buttons
|
|
209
|
+
.#{$ns}-input-group .#{$ns}-button {
|
|
210
|
+
border-radius: $pt-border-radius;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/*
|
|
214
|
+
Responsive control groups
|
|
215
|
+
|
|
216
|
+
Markup:
|
|
217
|
+
<div class="#{$ns}-control-group">
|
|
218
|
+
<div class="#{$ns}-input-group #{$ns}-fill">
|
|
219
|
+
<span class="#{$ns}-icon #{$ns}-icon-people"></span>
|
|
220
|
+
<input type="text" class="#{$ns}-input" placeholder="Find collaborators..." />
|
|
221
|
+
</div>
|
|
222
|
+
<button class="#{$ns}-button #{$ns}-intent-primary">Add</button>
|
|
223
|
+
</div>
|
|
224
|
+
<div class="#{$ns}-control-group #{$ns}-fill">
|
|
225
|
+
<button class="#{$ns}-button #{$ns}-icon-minus #{$ns}-fixed"></button>
|
|
226
|
+
<input type="text" class="#{$ns}-input" placeholder="Enter a value..." />
|
|
227
|
+
<button class="#{$ns}-button #{$ns}-icon-plus #{$ns}-fixed"></button>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
Styleguide control-group-fill
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
> .#{$ns}-fill {
|
|
234
|
+
flex: 1 1 auto;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
&.#{$ns}-fill > *:not(.#{$ns}-fixed) {
|
|
238
|
+
flex: 1 1 auto;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
/*
|
|
242
|
+
Vertical control groups
|
|
243
|
+
|
|
244
|
+
Markup:
|
|
245
|
+
<div class="#{$ns}-control-group #{$ns}-vertical" style="width: 300px;">
|
|
246
|
+
<div class="#{$ns}-input-group #{$ns}-large">
|
|
247
|
+
<span class="#{$ns}-icon #{$ns}-icon-person"></span>
|
|
248
|
+
<input type="text" class="#{$ns}-input" placeholder="Username" />
|
|
249
|
+
</div>
|
|
250
|
+
<div class="#{$ns}-input-group #{$ns}-large">
|
|
251
|
+
<span class="#{$ns}-icon #{$ns}-icon-lock"></span>
|
|
252
|
+
<input type="password" class="#{$ns}-input" placeholder="Password" />
|
|
253
|
+
</div>
|
|
254
|
+
<button class="#{$ns}-button #{$ns}-large #{$ns}-intent-primary">Login</button>
|
|
255
|
+
</div>
|
|
256
|
+
|
|
257
|
+
Styleguide control-group-vertical
|
|
258
|
+
*/
|
|
259
|
+
|
|
260
|
+
&.#{$ns}-vertical {
|
|
261
|
+
flex-direction: column;
|
|
262
|
+
|
|
263
|
+
> * {
|
|
264
|
+
margin-top: -$button-border-width;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
> :first-child {
|
|
268
|
+
border-radius: $pt-border-radius $pt-border-radius 0 0;
|
|
269
|
+
margin-top: 0;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
> :last-child {
|
|
273
|
+
border-radius: 0 0 $pt-border-radius $pt-border-radius;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|